Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delimiter //
- CREATE TRIGGER wyzwalacz AFTER INSERT ON customer FOR EACH ROW
- BEGIN
- SET @z=(SELECT MAX(account.AccNo) FROM account)+1;
- INSERT INTO account VALUES(@z,0,'Bugstone',CURDATE());
- INSERT INTO customer_account (RefNo, AccNo) VALUES(NEW.RefNo,@z);
- END//
- delimiter ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement