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 difference between function and trigger?
what is sub-query? : Transact sql
What is the difference between pl and sql?
what are string data types? : Sql dba
What is the usage of when clause in trigger?
How to create a menu in sqlplus or pl/sql?
What is the best sql course?
How do you exit in sql?
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
Can we create view in stored procedure?
How can I get the number of records affected by a stored procedure?
What is the sql*loader? : aql loader
What is sql comments?
Why do you partition data?
Write a sql query to convert all character to uppercase after hypen.