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
what is table? : Sql dba
Can unique keys be null?
How do I install microsoft sql?
Which is faster joins or subqueries?
How to run sql statements through the web interface?
Is big data nosql?
What is data type in database?
What do we need to check in database testing?
Explain 3 basic parts of a trigger.
What is sql*plus?
What are the subsets of sql?
What is pl sql block structure?
What is a null value?
Why is %isopen always false for an implicit cursor?
Can we insert delete data in view?