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: mkb <mkb125_at_yahoo.com>
Date: Thu, 13 Mar 2003 06:19:49 -0800
Message-ID: <F001.00568DC2.20030313061949@fatcity.com>


Assuming dups can be deleted, here's my humble attempt:

select col1, col2
from t
order by col1, col2;

Col1 Col2
- -
A B
B A
C D
E F
G H
H G

6 rows selected.

select col1, col2
from t
union
select col2, col1
from t
;

Col1 Col2
- -
A B
B A
C D
D C
E F
F E
G H
H G

8 rows selected.

mohammed


Do you Yahoo!?
Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: mkb
  INET: mkb125_at_yahoo.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:19:49 CST

Original text of this message

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