One Table having two rows with one colomn having values
Like"Male" and "Female". how to upadte these values
Like "Female" and "Male" in single update statement.

Answer Posted / hitendra yadav

--Try this

UPDATE Eptbl
SET Sex= CASE WHEN SEX='Male'
THEN 'Female'
ELSE 'Male'
END;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to loop through data rows in the implicit cursor?

539


Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.

1642


Is there an oracle sql query that aggregates multiple rows into one row?

542


How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

2722


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

1858






WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?

1800


what are the advantages of running a database in archive log mode?

1729


What is a nested table?

628


Is oracle a relational database?

520


What happens if the imported table already exists?

545


What are the tools for Oracle ?

601


how to use select statement as formal parameter in procedure specification?(someone said that using string) ex:-procedure(a in number,select ename from emp ) i am asking syntax like this?

1524


What are the differences between blob and clob in oracle?

580


ABOUT IDENTITY?

1553


What are the execution control statements in oracle?

600