Home » SQL & PL/SQL » SQL & PL/SQL » update query (9i,10g)
update query [message #444961] Wed, 24 February 2010 23:26 Go to next message
Messages: 15
Registered: November 2009
Junior Member
Hi All,

I need a DML Query to interchange row values

for example: i had a table called Tab1.there are 3 columns in that table
id name salary
1 raj 5000
2 ram 7000
3 ravi 10000

i need query to display like below

id name salary
1 ravi 5000
2 raj 7000
3 ram 10000
Please let me know the one DML Statement to get the above result.

Thanks & Regards,
Re: update query [message #444962 is a reply to message #444961] Wed, 24 February 2010 23:28 Go to previous messageGo to next message
Messages: 25537
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

nice homework assignment.
Re: update query [message #444964 is a reply to message #444961] Wed, 24 February 2010 23:30 Go to previous message
Michel Cadot
Messages: 65088
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.

Post a working Test case: create table and insert statements along with the result you want with these data.

Explain the result you with WORDS not only with a chart.

Previous Topic: Duplicate Detection
Goto Forum:

Current Time: Tue Jul 25 22:06:18 CDT 2017

Total time taken to generate the page: 0.09588 seconds