Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Post Closed as "exact duplicate" by Marc B, user229044, Mathew Thompson, Stephan, Sindre Sorhus
edited tags
Link
John Woo
  • 264.5k
  • 70
  • 509
  • 500
Source Link

delete duplicate entries in table

I want to delete multiple duplicate keys from the below table:

id | name | uid 1 | ekta | 5 2 | ekta | 5 3 | sharma | 10 4 | sharma | 10 

want it to be like

id | name | uid 1 | ekta | 5 3 | sharma | 10 

I am using mysql. Is it ossible.? I can't use unique constraint query to make unique enteries because i want this duplicate entries ones entered to the table.