On 12 Sep 2003 10:58:45 -0700, [EMAIL PROTECTED] (G. Ralph Kuntz, MD) wrote:
>I would like to select the second and subsequent rows where the first
>column is the same:
>
> 1 b
> 1 c
> 3 f
>
>in other words, all but the first row of a group.
all = SELECT * FROM t;
but =
> in other words, all but the first row of a group.
Interesting question. The below should work and be quick so long as
there is a UNIQUE(col1, col2) constraint.
SELECT col1
, col2
FROM j
WHERE col2 != (SELECT col2
FROM j AS jsub
WHERE col1 = j.col1