There is a table Table_A contains 4 feilds col1, col2, col3, col4 having values a, b, c, d as values respectively. What will be the code if someone wants to update a with b, b with c, c with d and d with a?

Showing Answers 1 - 1 of 1 Answers

Gurwinder Singh Saini

  • Feb 15th, 2007
 

SQL> select * from pn;COL1 COL2 COL3 COL4----- ----- ----- -----a b c dSQL> update pn set col4=col1, col1=col2, col2=col3, col3=col4 ;1 row updated.SQL> select * from pn;COL1 COL2 COL3 COL4----- ----- ----- -----b c d aSQL> commit;Commit complete.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions