Find duplicates in the same table in MySQL

后端 未结 13 1930
感动是毒
感动是毒 2020-12-10 02:03

I have a table with two columns - artist, release_id

What query can I run to show duplicate records?

e.g. my table is

ArtistX : 45677
ArtistY         


        
13条回答
  •  臣服心动
    2020-12-10 02:13

    You can also try something like this:

    SELECT W.artist, W.release_id FROM table W, table W1 
    WHERE W.artist= W1.artist AND W.release_id = W1.release_id;
    

提交回复
热议问题