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


Please Help Members By Posting Answers For Below Questions

What is the use of count (*) in sql?

538


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

639


What trigger means?

559


What is the use of partition by in sql?

508


How many indexes can be created on a table in sql?

490






Is nosql relational?

544


What is on delete set null?

557


What is using in sql?

552


What is java sql connection?

508


Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

1669


Is sql a microsoft product?

490


how is myisam table stored? : Sql dba

601


What is the starting oracle error number? What is meant by forward declaration in functions?

536


What is meant by user defined function?

575


Can we insert in sql function?

534