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 run sql*plus commands that are stored in a local file?

1070


How to use sql statements in pl/sql?

1136


What is an oracle stored procedure?

1071


Is keyword pl sql?

1012


How do I view a table in sql?

1015


how to select unique records from a table? : Sql dba

1120


What are the two parts of design view?

1023


What is the purpose of primary key?

1042


What is the difference between a primary key and a clustered index?

1000


List the various privileges that a user can grant to another user?

1053


What is gpt format?

950


What is aggregate function in sql?

1041


What is cascade in sql?

968


Does truncate require commit?

981


How delete all data from all tables in sql?

955