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 / parli jain
Update table_name
set Gender = decode (Gender, 'M', 'F', 'F,'M')
where Gender In ('M','F');
| Is This Answer Correct ? | 29 Yes | 4 No |
Post New Answer View All Answers
Does truncate free space?
What is rank dense_rank and partition in sql?
Is left join same as join?
What is dba in sql? : SQL DBA
What is dbo in sql?
What is pessimistic concurrency control? : Transact sql
What is a sql instance vs database?
What are the three forms of normalization?
Advantages and disadvantages of stored procedure?
Can ddl statements be used in pl/sql?
What is cte?
Explain the difference between triggers and constraints?
What is rename command in sql?
Is pl sql and postgresql same?
Why do we use subquery?