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
Explain sessions. Explain how batches are used to combine executions?
What is persistent lookup cache?
How can informatica be used for an organization?
What are the advantages of informatica?
Define filter transformation?
hi real timers . iam waiting for ur reply regarding ETL TESTING
How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?
What is Cognos script editor?
how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?
What is a shortcut and copy in Informatica and how two are different with each other?
Explain the aggregator transformation?
What is sorter transformation?
Tell me about Propagate functions in informatica
Can I use same Persistent cache(X.Dat) for 2 sessions running parallely? If it is not possible why?If yes How?
I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.