Using the distinct function in SQL

前端 未结 18 916
無奈伤痛
無奈伤痛 2021-02-06 16:55

I have a SQL query I am running. What I was wanting to know is that is there a way of selecting the rows in a table where the value in on one of those columns is distinct? When

18条回答
  •  执笔经年
    2021-02-06 17:28

    distinct requires a unique result-set row. This means that whatever values you select from your table will need to be distinct together as a row from any other row in the result-set.

    Using distinct can return the same value more than once from a given field as long as the other corresponding fields in the row are distinct as well.

提交回复
热议问题