I have an easy SQL question regarding rows with duplicate column fields. What I would like to do is return a maximum of 1 row if 1 or more are returned by select.
ClientID(PK) Firstname Lastname orderID(FK)
If there is a duplicate orderID, I'd like to return just one record of the typically two that return.
My SQL experience is pretty new, how would I return just one record matching my where clause?
Question
AaronMT
Hey,
I have an easy SQL question regarding rows with duplicate column fields. What I would like to do is return a maximum of 1 row if 1 or more are returned by select.
If there is a duplicate orderID, I'd like to return just one record of the typically two that return.
My SQL experience is pretty new, how would I return just one record matching my where clause?
Thanks
Link to comment
Share on other sites
9 answers to this question
Recommended Posts