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
What sql does db2 use?
What is the use of procedures?
How to call a javascript function from pl sql?
explain the delete statements in sql
How global cursor can be declare with dynamic trigger ?
Enlist the advantages of sql.
What is the difference between database trigger and stored procedure?
What is a crud api?
Can we use ddl commands in pl sql?
What are the types of variables use in pl sql?
What is the use of index in sql?
what is a composite key ? : Sql dba
Can we use loop in sql?
What are different types of triggers?
What is 19 null in sql?