sql server - I want to update the salary for the employees whose joined last 6 years in sql -


i tried query, i'm stuck in where condition. can me how update salary joined last 6 years?

query:

update emp set sal=sal+3000 doj=(select doj emp doj) 

hopefully :)

update emp set sal=sal+3000 doj>=sysdate-6*365 , doj<sysdate; 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -