0

I got double row in my sql database and I don't know how to remove them.

(my sql table)

  date        quantity  city   supervisor  bonus  empnum
  ----------  --------  -----  ----------  -----  ------
  2016-05-01       46   laval  mlasselin      10     837
  2016-05-01       46   laval  mlasselin      10     837
  2016-05-01       46   laval  mlasselin      10     837
  2016-05-01       43   laval  mlasselin      25     880

I want to use a SQL query to delete extra row only keep one. I have this kind of row all my database I need a sql query to remove them all and keep only one date and one empnum

I dont have id like the other standart table
Q: What SQL query can I use to remove the duplicate rows?

1 Answers1

0

DELETE FROM foo WHERE a=12345 LIMIT 1;

Find something unique that identifies the lines you want to delete and then use the LIMIT clause.

David Stokes
  • 120
  • 3