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.

Answers were Sorted based on User's Feedback



Interchange the value of a column Gender in a table where values are Male and Female. So, where th..

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

Interchange the value of a column Gender in a table where values are Male and Female. So, where th..

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

Interchange the value of a column Gender in a table where values are Male and Female. So, where th..

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

Interchange the value of a column Gender in a table where values are Male and Female. So, where th..

Answer / sushma s

Update table_name
Set gender = decode(gender,'M','F','M');

Is This Answer Correct ?    8 Yes 9 No

Post New Answer

More SQL PLSQL Interview Questions

Does pdo prevent sql injection?

0 Answers  


What is embedded sql in db2?

0 Answers  


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

0 Answers  


What is dynamic SQl and how you will create and execute dynamic sql?

2 Answers   TCS,


what is the difference between granting and creating a view?

2 Answers  


Is it possible to create startup or shutdown trigger for on-schema?

0 Answers  


What is a merge query?

1 Answers  


function can return value ,procedure also return value through out parameter then what is the difference?

3 Answers   3i Infotech,


What does partition by mean in sql?

0 Answers  


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

0 Answers  


what is pragma ?

1 Answers   Polaris,


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

0 Answers  


Categories