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

Are there any features that are decommissioned in 11g that are not present in 11g?

2152


What is sql in oracle?

1072


What is the need of a partition key?

994


Can a procedure in a package be overloaded?

1056


describe transaction-safe table types in mysql : sql dba

1016


How to pronounce postgresql?

1066


What program will open a mdb file?

976


Mention what plvcmt and plvrb does in pl/sql?

1149


How do you select unique values in sql?

1009


What is the function that is used to transfer a pl/sql table log to a database table?

1031


Is primary key an index?

1000


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

2118


Why use triggers in sql?

963


what is bcp? When does it used? : Sql dba

1001


What are the different parts of a package?

1118