I was wondering if I can subtract the same value (offset) to all values of a specific column in my table.
For example I have:
Col1
------
34
35
36
I want to make it:
Col1
------
24
25
26
What’s the SQL code for doing it ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you just doing this for display, or do you want to update the table with the reduced values?
In the first case:
In the second (assuming you want to update ALL rows):