‘distinct’ keyword

distinct只能放在首列之前,作用于select出的所有列;若与order by一起使用,则order by后的字段需出现在select列表中。

 'distinct‘ keyword can only be placed before the first column and applies to all columns written;when used with ’order by‘ keyword,the fields after ’order by‘ keyword must appear in the ’select‘ list。

原文地址:https://www.cnblogs.com/coder1000/p/13974069.html