Fratini Posted February 16, 2016 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 153 Reputation: 8 Joined: 07/01/14 Last Seen: May 3, 2018 Share Posted February 16, 2016 Hi! I'm thinking of reduce 1 from a value in SQL. For example: I have a value called 'zeny' from a table called 'debt', which has 300,000. I want to reduce 1 from that value, which goes to 299,999. How can I make that in a sample way? Thank you for your time! Quote Link to comment Share on other sites More sharing options...
0 Tokei Posted February 16, 2016 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 722 Joined: 11/12/12 Last Seen: 18 hours ago Share Posted February 16, 2016 You could use the following: UPDATE `debt` SET `zeny` = `zeny` - 1 WHERE `zeny` > 0 1 Quote Link to comment Share on other sites More sharing options...
0 Fratini Posted February 16, 2016 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 153 Reputation: 8 Joined: 07/01/14 Last Seen: May 3, 2018 Author Share Posted February 16, 2016 Thank you! Quote Link to comment Share on other sites More sharing options...
Question
Fratini
Hi!
I'm thinking of reduce 1 from a value in SQL. For example:
I have a value called 'zeny' from a table called 'debt', which has 300,000.
I want to reduce 1 from that value, which goes to 299,999.
How can I make that in a sample way?
Thank you for your time!
Link to comment
Share on other sites
2 answers to this question
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.