MENU

distinct的用法

June 2, 2018 • Read: 201 • SQL

distinct【不允许重复的】
select distinct deptno from emp;--过滤掉deptno重复的值
select distinct deptno,comm from emp;--把comm和deptno的组合进行过滤
select comm,distinct deptno from emp;--error,逻辑上有错误
最后编辑于: August 27, 2018
Archives Tip
QR Code for this page
Tipping QR Code
Leave a Comment