mysql篩選重復(fù)數(shù)據(jù) 數(shù)據(jù)庫(kù)中查找名字相同的人?
數(shù)據(jù)庫(kù)中查找名字相同的人?如果每個(gè)學(xué)生只有一條記錄,則按姓名分組,計(jì)算記錄數(shù)(大于1),然后以姓名數(shù)相同的人的姓名為條件檢索相應(yīng)的信息。句子如下:select*from student table w
數(shù)據(jù)庫(kù)中查找名字相同的人?
如果每個(gè)學(xué)生只有一條記錄,則按姓名分組,計(jì)算記錄數(shù)(大于1),然后以姓名數(shù)相同的人的姓名為條件檢索相應(yīng)的信息。句子如下:select*from student table where name in(selecct name from student table group by name having count(*)>1)