查詢資料表中重複的資訊

每次要用時都會小忘記一下….
來記錄看以後會不會記得 (謎之聲:不會….)

select * from unit where `schoolid` in 
      (select `schoolid` from unit group by `schoolid` having count(`schoolid`)>1 ) 
      order by `schoolid`
This entry was posted in MySQL. Bookmark the permalink.