Page 1 of 1

ON_SELECT auto increment, possible??

Posted: Sat Oct 21, 2006 10:02 am
by gotlisch
Hi Guys,

I'm looking for a way of auto incrementing an entity in a table.

What I'm trying to achieve is that when a user logs in to my system,
in other words when a specific row is selected a colum value called
"hits" or what ever is automatically incremented without have to
perform an update. Is that possible?


Cheers,


Mikael

Posted: Sat Oct 21, 2006 11:25 am
by Chris Corbyn
Not that I'm aware of. If you need to change a value in an SQL based database you'll have to run an UPDATE.

Posted: Sat Oct 21, 2006 11:38 am
by pedrotuga
cant this be done by using a simple trigger????

which database software do you use?

Posted: Sat Oct 21, 2006 3:06 pm
by feyd
pedrotuga wrote:cant this be done by using a simple trigger????

which database software do you use?
There are no triggers for SELECT in MySQL, at least.