MySQL Forums
Forum List  »  Triggers

How can I create a trigger that increments on read?
Posted by: Greg Chandler
Date: August 18, 2005 07:36PM

I've got a table with a single row. That row has 1 field. I need to figure out a way to auto increment the vault {in place} every time I read it. So every time a client connects for the data, and does a select it gets a new value.

I'd like to avoid locking if possible, because several machines, with several clients/threads each will be making the queries.
Locks mean they will stack up amd wait, {and in tests back up to the point of a timeout}.

Anyone have any ideas?

Options: ReplyQuote




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.