MENU

distinct的用法

June 2, 2018 • Read: 2536 • SQL阅读设置

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