Andy's Blog » » MySQL排除重复记录

MySQL排除重复记录

如果要从table中取出name字段,并排除重复

SELECT DISTINCT `name` FROM `table`;

如果要从table中取出不重复的记录,应该是这样

SELECT * FROM `table` GROUP BY `name`;

Incoming search terms:

Tags: mysql

本文地址: http://www.21andy.com/new/20071119/670.html