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 / raghu

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

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many values can the set function of mysql take? : Sql dba

935


How is sql used in oracle?

971


How can triggers be used for the table auditing?

1013


What do you understand by case manipulation functions?

954


What is the use of index in hive?

965


Can triggers stop a dml statement from executing on a table?

1029


what is the use of friend function? : Sql dba

976


Can a composite key be null?

913


How does sql store data?

867


Do stored procedures prevent sql injection?

920


Is sql a backend language?

1043


explain the difference between bool, tinyint and bit. : Sql dba

939


What is meant by <> in sql?

895


What is a sql instance vs database?

1039


Is drop table faster than truncate?

943