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
What will you get by the cursor attribute sql%found?
what are date and time data types? : Sql dba
What is mutating error?
how to get a list of all tables in a database? : Sql dba
What does pragma mean?
Why do we need a foreign key?
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
Explain mutating table error.
Which version of sql do I have?
What are all the common sql functions?
what is bdb (berkeleydb)? : Sql dba
What is the difference between a query and a report?
Describe sql comments?
What is pl sql collection?
What do you understand by pl/sql packages?