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...

Interchange the value of a column Gender in a table where
values are Male and Female. So, where the value is Male, it
should changed to Female and Female to Male.

Answer Posted / ram

UPDATE TABLE
SET GENDER=(CASE GENDER
WHEN 'M' THEN 'F'
WHEN 'F' THEN 'M'
END) WHERE GENDER IN ('M','F')

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is hadoop a nosql?

950


How many types of privileges are available in sql?

1286


Can we call dml statement in function?

980


What is difference between db2 and sql?

940


Why is %isopen always false for an implicit cursor?

1037


What is difference between pls_integer and integer?

910


what are the nonstandard string types? : Sql dba

1085


give the syntax of grant and revoke commands? : Sql dba

1090


What is raw datatype in sql?

982


What is the purpose of the primary key?

1008


What is trigger in sql? Explain

945


Why we use stored procedure instead of query?

953


What is function and procedure in pl sql?

975


Explain isolation levels. : Transact sql

1017


how to create a new view in mysql? : Sql dba

895