Phoenix
Phoenix

Reputation: 1530

How to find duplicate value of a column value using mysql?

I've a mysql table with the following data.

enter image description here

in the above image, some rows contains duplicate.

my question is how to find the repeated data in it?

For example : invoice_id = 19632, container duplicate data like BL No - NYKSMAAT20342300, Containers 3X40HC, 1X20GP and so on.

Pls help.

Upvotes: 0

Views: 32

Answers (1)

Aman Kumar
Aman Kumar

Reputation: 4547

Simple you can use this query to get duplicate entry from table

SELECT narration, COUNT(*) count FROM table GROUP BY narration HAVING count > 1;

Upvotes: 1

Related Questions