Increment an INT
Moderator: General Moderators
Increment an INT
HI, is there any way I can just increment an INT in MySQL without selecting, then incrementing, then updating? Thanks for any help.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
UPDATE tablename SET `int_field` = `int_field` + 1 WHERE `some_cond` = 2