jmaccs64 Posted September 17, 2006 Share Posted September 17, 2006 How would I have SQL subtract 1 from a certain field where a match is found? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 17, 2006 Share Posted September 17, 2006 UPDATE yourTable SET yourField = IF( yourField = 'yourValue', yourField-1, yourField ) Quote Link to comment Share on other sites More sharing options...
jmaccs64 Posted September 18, 2006 Author Share Posted September 18, 2006 Your the best Fenway! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.