Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to swap two values in the same column using UPDATE?

greddyJan 24 2011 — edited Jan 24 2011
Hi All,

I have a table called TEST and it has one column called A.

and A has values like the following

A
------
10
20
30
40
50

My question is how to move "10" to the place of "20" and "20" to the place of "10" in the column A? this swapping is only for the first two values(i.e., 10, 20)

Note: It should be done only in SQL, not in PLSQL.

Any advice?

Thanks in advance?
This post has been answered by Nimish Garg on Jan 24 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2011
Added on Jan 24 2011
16 comments
7,676 views