Kirti,
It's impossible to have a primary key as you have duplicate values. C-D and E-F both have dupes. If there should be D-C and F-E, a simple Order By Col1 would do the trick.
Jerry Whittle
ASIFICS DBA
NCI Information Systems Inc.
[EMAIL PROTECTED]
618-622-4145
-----Original Message-----
From: Deshpande, Kirti [SMTP:[EMAIL PROTECTED]
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.
- Kirti