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 ?
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 ?
Are you just doing this for display, or do you want to update the table with the reduced values?
In the first case:
select (Col1 - 10) from table
In the second (assuming you want to update ALL rows):
update table set Col1 = (Col1 - 10)