LLLLLLL Posted March 17, 2017 Share Posted March 17, 2017 I have a trigger, CREATE TRIGGER `TRIGGER_SOMETABLE_UID` BEFORE INSERT ON `SOMETABLE` FOR EACH ROW SET NEW.Uid = UUID( ) Now, I thought this would fire FOR EACH ROW, but if I'm doing an insert like this... insert into sometable ( col1, col2 ) ( select col1, col2 from SOME_OTHER_tABLE ) ... and that inserts two rows, the result is that Uid in both new rows is identical. This is not the desired behavior. Can you tell me how to get a unique Uid in each row? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.