当前位置:Gxlcms > 数据库问题 > SQL- select distinct

SQL- select distinct

时间:2021-07-01 10:21:17 帮助过:5人阅读

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

SQL- select distinct

标签:

人气教程排行