Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: A SQL Question

RE: A SQL Question

From: Naveen Nahata <naveen_nahata_at_mindtree.com>
Date: Thu, 13 Mar 2003 06:09:13 -0800
Message-ID: <F001.00568CBF.20030313060913@fatcity.com>


Will 'ORDER BY col1' not do?? ;-) Atleast in this example it does.

What are exact requirements?

Regards
Naveen

-----Original Message-----
Sent: Thursday, March 13, 2003 6:54 PM
To: Multiple recipients of list ORACLE-L

Hi SQL Developers,

I have a table as follows:

Col1 Col2


A        B
C        D
E        F
G        H
B        A
E        F
C        D
H        G

With a PK on (Col1, Col2).

How do I write a SQL script to get following result?

Col1 Col2


A        B
B        A
C        D
D        C
E        F
F        E
G       H
H       G

Thanks for your help.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Naveen Nahata
  INET: naveen_nahata_at_mindtree.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Mar 13 2003 - 08:09:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US