Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the hint? how to use it to reduce the query processing in program?

7965


What do you mean by filter transformation?

1001


Differentiate between reusable transformation and mapplet.

1141


What is the use of an aggregator cache file?

1245


Explain what transformation and how many are there in informatica?

1021


can any one give some examples for pre sql and post sql(Except dropping and creating index).

4147


What if the source is a flat-file?

1167


What is the benefit of session partitioning?

1157


In informatica workflow manager, how many repositories can be created?

1435


Write the unconnected lookup syntax and how to return more than one column.

1147


What is a sequence generator transformation?

1070


What does command task mean?

1214


scenario where i can use only concurrent execution of workflow.

3254


What is sq transformation?

1227


What is the need of an ETL tool?

1155