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
santosh4483
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
Tab1:
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,
San
Re: update query [message #444962 is a reply to message #444961] Wed, 24 February 2010 23:28 Go to previous messageGo to next message
BlackSwan
Messages: 25039
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: 64111
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.

Regards
Michel
Previous Topic: Duplicate Detection
Next Topic: QUERY FOR GROUPING AND COUNT
Goto Forum:
  


Current Time: Mon Dec 05 21:21:20 CST 2016

Total time taken to generate the page: 0.09183 seconds