Apr 2, 2003 #1 cartw19 Programmer Feb 11, 2003 8 GB I have a table with multiple occurences of key values, how do I retrieve the first row only on a Select statement.
I have a table with multiple occurences of key values, how do I retrieve the first row only on a Select statement.
Apr 2, 2003 #2 swampBoogie Programmer Jan 6, 2003 1,660 SE First is not a relational concept. Records in a table does not have a specific order, they are only identified by the values in the columns. To get the highest value with each group you can use select pk1,max(pk2) from t group by pk1 Upvote 0 Downvote
First is not a relational concept. Records in a table does not have a specific order, they are only identified by the values in the columns. To get the highest value with each group you can use select pk1,max(pk2) from t group by pk1