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.
Answers were Sorted based on User's Feedback
Answer / murali mohan
Try this,
update testsamp1 set c=decode
(c,'MALE','FEMALE','FEMALE','MALE');
Regards,
Murali
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / selvaraj anna university coe
UPDATE Eptbl SET Sex=DECODE
(Sex,'Male','Female','Female','Male');
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / brahma prakash
Murali your answer is not running on postgres database
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
Answer / apsar
update tbl_name set (a,b) = (select b,a from tbl_name where a='Male');
Is This Answer Correct ? | 0 Yes | 0 No |
Does rowid change in oracle?
What is an oracle tablespace?
what is normalisation?what are its uses?
what is foreign key?
Explain drop constraint oracle?
What is the difference between normal and corelated subqueries?
which clause we are not used in where clause?
Is oracle a relational database?
how can db_files > maxdatafiles since db_files is for instance and the later is for database
How to add a new column to an existing table in oracle?
hey friends, What are the steps I can do to transfer the database from Microsoft Access 2003 to oracle10g (or SQL) Best regards
How many types of tables are there in oracle?