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
Is hadoop a nosql?
How many types of privileges are available in sql?
Can we call dml statement in function?
What is difference between db2 and sql?
Why is %isopen always false for an implicit cursor?
What is difference between pls_integer and integer?
what are the nonstandard string types? : Sql dba
give the syntax of grant and revoke commands? : Sql dba
What is raw datatype in sql?
What is the purpose of the primary key?
What is trigger in sql? Explain
Why we use stored procedure instead of query?
What is function and procedure in pl sql?
Explain isolation levels. : Transact sql
how to create a new view in mysql? : Sql dba