Home Forums SQL Server 7,2000 T-SQL group by part of a multi column primary key RE: group by part of a multi column primary key

  • I may be over-simplifying this, but:

    
    
    SELECT col1,
    Max(col2)
    FROM t1
    GROUP BY col1

    --SJTerrill

    Ah, I'm definitely over-simplifying. I believe you'll have to resort to subquery to return the contents of the whole row.

    Edited by - TheWildHun on 06/12/2003 12:49:27 PM