Unique vs Distinct keyword in Oracle

前端 未结 4 1799
渐次进展
渐次进展 2021-01-18 17:54

I am a bit confused about the uses of these words. I have a table with he following columns: SITE, LAT, LONG, NAME, ......

I want results with unique (or is it disti

4条回答
  •  梦谈多话
    2021-01-18 18:20

    UNIQUE is used for defining contraints on the data that can be stored in the table.

    DISTINCT is used in queries to remove duplicates from the result set, without affecting the underlying table data.

提交回复
热议问题