Reputation: 137
How can I update the values in SQL column using multiplication and then divide it again?
Values of column "price" need to be updated with "price" multiplied by 1.08 and then "price" divide by 1.077
Thanks a lot for the help Andreas
Upvotes: 2
Views: 1423
Reputation: 1269943
Simply chain the arithmetic:
update t
set price = price * 1.08 / 1.077;
Multiplication and division can be done in the same operation.
Upvotes: 2