oracle学习笔记之取消重复行distinct
?可以使用distinct命令 来取消查询结果的重复行
如下:没有使用distinct 命令
SQL> select deptno from scott.emp; DEPTNO---------- 20 30 30 20 30 30 10 20 10 30 20 30 20 10已选择14行。
?使用了distinct命令后的效果:
SQL> select distinct deptno from scott.emp; DEPTNO---------- 30 20 10
?