sql之distinct用法
2018-01-12 16:15
197 查看
distinct作用是去除重复的查询结果,只保留一个。
如下:在EMPLOYEE表里有条数据,姓名一样,部门也一样,但是其它列的值都不相等。
使用 select distinct FName,FDepartment from Employee where FName='John' 查出的结果是:
使用 select distinct FName,FAge from T_Employee where FName='John' 查出的结果是:
如下:在EMPLOYEE表里有条数据,姓名一样,部门也一样,但是其它列的值都不相等。
使用 select distinct FName,FDepartment from Employee where FName='John' 查出的结果是:
使用 select distinct FName,FAge from T_Employee where FName='John' 查出的结果是:
相关文章推荐
- SQL中distinct的用法
- SQL中distinct的用法
- SQL中distinct的用法
- SQL中distinct的用法(转)
- SQL中distinct的用法
- SQL中distinct的用法(四种示例分析)
- 详述 SQL 中的 distinct 和 row_number() over() 的区别及用法
- SQL中distinct的用法(四种示例分析)
- 数据库sql中distinct用法注意事项
- SQL 数据库 学习 019 查询-02 distinct 的用法 --- 不允许重复
- SQL中distinct 和 row_number() over() 的区别及用法
- SQL中distinct 和 row_number() over() 的区别及用法
- sql distinct 用法
- sql 中 distinct 去除重复 用法
- SQL中distinct的用法
- SQL中distinct的用法
- SQL中distinct的用法
- SQL中distinct的用法
- 详述 SQL 中的 distinct 和 row_number() over() 的区别及用法
- SQL中distinct的用法