If you want to find duplicated value in table when you can not set unique for some column. Use this query.
Query 1. select column1,count(*) as count where my_table group by column1
* column1 is that you select, my_table is that you want to see.Then you can see count column that you want to know what values are duplicated.
Query 2. select column1,count(*) as count where my_table group by column1 having count > 1
Then you can see all rows just be duplicated.
No comments:
Post a Comment