Suppose a emp table contain following field
name,o_salary,n_salary and n_salary is blank ,there values is:
A 5000
b 6000
c 7000
d 8000
now I want to update emp table with following data:-
name o_salary n_salary
A 5000 5000
b 600
Help me immediate
Help with SQL table column having null
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Princy GuptaRank #1,602 · 982 reputationPosted Apr 15, 2014, 9:10 PM EDT
SET column1=value1,column2=value2,...
Bharath ReddyRank #6,320 · 270 reputationPosted Apr 15, 2014, 10:07 PM EDT
Khan Abrar AhmedRank #778 · 3K reputationPosted Apr 15, 2014, 10:33 PM EDT
update emp set n_salary=5000 where name='A'
update emp set o_salary=600 where name='b'
Abhay ShankerRank #375 · 6.7K reputationPosted Apr 15, 2014, 10:45 PM EDT