SQL- select distinct

http://www.w3school.com.cn/sql/sql_distinct.asp

SQL SELECT DISTINCT

关键词DISTINCT用于返回唯一不同的值。

语法:

SELECT DISTINCT column_name from table_name

实例:

"Orders"表

CompanyOrderNumber
IBM 3532
W3School 2356
Apple 4698
W3School 6953

select Company from Orders

返回结果:

Company
IBM
W3School
Apple
W3School

select distinct Company from Orders

返回结果:

Company
IBM
W3School
Apple
原文地址:https://www.cnblogs.com/isister/p/4561241.html