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 / parli jain

Update table_name
set Gender = decode (Gender, 'M', 'F', 'F,'M')
where Gender In ('M','F');

Is This Answer Correct ?    29 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I add a database to sql?

1139


What does pragma mean?

1064


What is sqlite used for?

1010


explain what is mysql? : Sql dba

1091


What are two statement types in sql?

1122


How do I save the results of sql query in a file?

985


How we can update the view?

1054


How to avoid duplicate records in a query?

1017


how can we destroy the cookie? : Sql dba

1018


what is the stuff function and how does it differ from the replace function? : Sql dba

1062


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1236


What is difference between rank () row_number () and dense_rank () in sql?

1118


What is difference between group by and partition by?

1072


what are local and global variables and their differences? : Sql dba

1086


Can we create table in function?

973