SQL question
From: muteki <szeming_at_alumni.washington.edu>
Date: 15 Jan 2004 18:33:35 -0800
Message-ID: <f5cee8fb.0401151833.7ac37f7a_at_posting.google.com>
Date: 15 Jan 2004 18:33:35 -0800
Message-ID: <f5cee8fb.0401151833.7ac37f7a_at_posting.google.com>
Hi,
I am pretty new to SQL and I would like to know is it possible to do
the following task in SQL?
I have a table containing 2 columns A, B where A is the primary key.
If the table contains the following data.
I would like to run a sql statement to get rid of all the rows
containing duplicated entries of B where the smaller A will get
deleted. (keep the last row where there is no longer duplicates of B)
The end result will be
Thanks,
A B
--- ---
1 a
2 b
3 b
4 b
5 c
6 c
7 d
A B
--- ---
1 a
4 b
6 c
7 d
--muteki Received on Fri Jan 16 2004 - 03:33:35 CET