sql distinct 去重
作用于单列
select distinct name from A
作用于多列
select distinct name, id from A
distinct必须放在开头
select id, distinct name from A; --会提示错误,因为distinct必须放在开头
作用于单列
select distinct name from A
作用于多列
select distinct name, id from A
distinct必须放在开头
select id, distinct name from A; --会提示错误,因为distinct必须放在开头