I have this SQL statement:
id is a unique number
co_name has many values that are the same, I am looking for something that will select the first DISTINCT co_name and the id associated with it.
The above SQL doesn't do this, because I think it selects the unique id and the co_name.
Code:
SELECT DISTINCT co_name, id FROM user
id is a unique number
co_name has many values that are the same, I am looking for something that will select the first DISTINCT co_name and the id associated with it.
The above SQL doesn't do this, because I think it selects the unique id and the co_name.