Mysql method to remove duplicate queries: 1. Use distinct, the code is [select distinct name from a where statesign=0]; 2. Use group by, the code is [statesign=0 group by.].
Mysql method to remove duplicate queries:
1: Use distinct
select distinct name from a where statesign=0
to query the table Name field in a, remove duplicate records
2: Use group by
select name from a where statesign=0 group by name
to query the name field in table a, group it, remove duplicate records
Related Learning recommendation: mysql video tutorial
The above is the detailed content of How to remove duplicate queries in mysql. For more information, please follow other related articles on the PHP Chinese website!