Jump to content


This topic is now archived and is closed to further replies.


Corrent mysql syntax for this minus query?

Recommended Posts

[quote author=dragonusthei link=topic=111840.msg453424#msg453424 date=1161126356]
UPDATE order_numbers SET order_number - 3

doesnt work so how would i update a table and take a number away from a field.

Just use the column name your subtracting from!

[code]UPDATE order_numbers SET order_number = ( order_number - 3 ) WHERE some_column = some_value[/code]


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.