START TRANSACTION;
insert into tasks (seq)
values (null);
update tasks
set seq = LAST_INSERT_ID()
where id = LAST_INSERT_ID();
COMMIT;
Created
November 24, 2022 10:13
-
-
Save akagaeng/7b73b465265ccd6741c545449a7226a4 to your computer and use it in GitHub Desktop.
Insert seq same as auto_increment id value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment