In EMP table, for those emp whose Hiredate is same, update
their sal by "sal+500" or else for others keep the sal as it
is, how to do it by SQL query
Answer Posted / guest
update emp a set a.sal=a.sal+500 where a.hiredate in(select
max(b.hiredate) from emp b group by b.hiredate having
count(b.hiredate)>1);
or
update emp a set a.sal=a.sal+500 where a.hiredate=(select
max(b.hiredate) from emp b where a.hiredate=b.hiredate group
by b.hiredate having count(b.hiredate)>1);
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is data movement mode in Informatica and difference between them?
Why sorter is an active transformation?
What are the databases that informatica can connect to windows?
What are batches?
What is the difference between Active and Passive transformation?
Performance tuning( what you did in performance tuning)
What is a grid in Informatica?
How to load data in informatica ?
Briefly define reusable transformation?
What is flashback table ? Advance thanks
What do you mean by channel change?
What is the meaning of decode in informatica?
What is the advantage of informatica?
Please tell me which institute is the best to study Informatica and asp.net in chennai Also please send me the latest interview questions in asp.net,c# and sql server to my id ramtryin@gmail.com
How to create a non-reusable instance of reusable transformations?