I am trying to create a trigger in mysql that will insert in to another table when an insert on a table occurs.
CREATE TRIGGER addCardForNewUser AFTER INSERT ON swiped.Users
FOR EACH ROW
BEGIN
INSERT INTO swiped.Card (userid) VALUES (get value from original insert here);
END
In the values part of the insert statement how would i get a value from the original insert to use here?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…