首页 > Linux操作系统 > Linux操作系统 > distinct多个字段
SQL> select * from test_sq;
ID DD
---------- --------------------
1 2
1 3
1 2
SQL> select distinct id,dd from test_sq;
ID DD
---------- --------------------
1 3
1 2
SQL> select distinct(id||','||dd) from test_sq;
(ID||','||DD)
-------------------------------------------------------------
1,3
1,2
SQL> select distinct id from test_sq;
ID
----------
1
SQL> select distinct dd from test_sq;
DD
--------------------
3
2
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22492385/viewspace-720198/ ,如需转载,请注明出处,否则将追究法律责任。