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
Name some usages of database trigger?
Is microsoft sql free?
What is the difference between left and left outer join?
What is left join in postgresql?
What is a loop in sql?
What are the disadvantages of file system?
How many types of triggers are there in pl sql?
what is difference between delete and truncate commands? : Sql dba
How to process query result in pl/sql?
Explain architecture of sql server notification services?
Why is sql better than hql?
Explain select statements in sql?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
Can you call pl/sql package functions from within a fast formula?