Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
number23
Starting Member
5 Posts |
Posted - 2009-01-26 : 05:12:19
|
i have a connection to mysql through ASP in which i insert value in a table :insert into codes (expiry) values (400) know i want this value to be decremented each second till it reaches 0 then drop it from the table i.e. if the value is 60, then i need it to be decremented by one each second, so after 60 second it reaches 0please help me with this issue |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-26 : 05:19:17
|
UPDATE CodesSET Expiry = Expiry - 1WHERE Expiry > 0Put the code above in a job. E 12°55'05.63"N 56°04'39.26" |
|
|
number23
Starting Member
5 Posts |
Posted - 2009-01-26 : 14:30:04
|
this way i decrement the table value just once i need to decrement it automatically every second !!!!! |
|
|
|
|
|