mysql去除重复查询的方法:1、使用distinct,代码为【select distinct name from a where statesign=0】;2、使用group by,代码为【statesign=0 group by .】。

mysql去除重复查询的方法:
1:使用distinct
select distinct name from a where statesign=0
查询表a中的name字段,去除重复记录
2:使用group by
select name from a where statesign=0 group by name
查询表a中的name字段,分组,去除重复记录
上一篇:怎么修改mysql列名称
下一篇:php全局变量的使用方法