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 / sanjay gupta
Hi Srinu,
you check the query once again..Query is not wrong..
UPDATE emp
SET sal=sal+500
WHERE hiredate IN (SELECT hiredate
FROM emp
HAVING COUNT(*)>1
GROUP BY hiredate
it'll give the same result whether we write count(*) or
count(hiredate)..
But I agree but its better to give count(hiredate)instead of
COUNT(*)...coz it is easier to understand.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
what is the hint? how to use it to reduce the query processing in program?
What do you mean by filter transformation?
Differentiate between reusable transformation and mapplet.
What is the use of an aggregator cache file?
Explain what transformation and how many are there in informatica?
can any one give some examples for pre sql and post sql(Except dropping and creating index).
What if the source is a flat-file?
What is the benefit of session partitioning?
In informatica workflow manager, how many repositories can be created?
Write the unconnected lookup syntax and how to return more than one column.
What is a sequence generator transformation?
What does command task mean?
scenario where i can use only concurrent execution of workflow.
What is sq transformation?
What is the need of an ETL tool?