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 use of transformation?
Please let me know how to make Data masking in informatica..
How to extract sap data using informatica?
What are the types of schemas we have in data warehouse and what are the difference between them?
explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?
Tell me any other tools for scheduling purpose other than workflow manager pmcmd?
Enlist the differences between database and data warehouse.
What is standalone command task?
Under which circumstances, informatica server creates reject files?
Define mapping and session?
What is lookup transformation?
What is the meaning of up gradation of repository?
How you know when to use a static cache and dynamic cache in lookup transformation?
How do you convert single row from source into three rows into target?
What is a node in Informatica?