MySQL Forums
Forum List  »  Newbie

Re: Simulating sequences
Posted by: Bonnie Kenison
Date: July 09, 2014 10:17AM

So, are you saying that because I am using:

UPDATE sequence SET id = LAST_INSERT_ID(id + 1) WHERE sequence_id = 'MySequenceName'

instead of

UPDATE sequence SET id = id + 1 WHERE sequence_id = 'MySequenceName'

that this is why the update statement is sometimes trying to set id to be the same value on two different threads (ie, getting zero rows updated)?

Options: ReplyQuote


Subject
Written By
Posted
June 30, 2014 10:26AM
June 30, 2014 10:49AM
July 02, 2014 01:37PM
July 03, 2014 12:17PM
July 07, 2014 08:50AM
July 07, 2014 11:25AM
July 07, 2014 08:16PM
July 08, 2014 03:08PM
July 08, 2014 08:03PM
Re: Simulating sequences
July 09, 2014 10:17AM
July 09, 2014 12:56PM
July 09, 2014 03:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.