Skip to content

Instantly share code, notes, and snippets.

@sagar290
Created December 14, 2023 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar290/f9357111eaba2a4154e01db805565954 to your computer and use it in GitHub Desktop.
Save sagar290/f9357111eaba2a4154e01db805565954 to your computer and use it in GitHub Desktop.
# for select duplicate
SELECT * FROM `lb` t1, `users` t2 WHERE t1.user_id = t2.id AND t2.dff_stm = 1 ;
# for delete duplicate
DELETE t1 FROM `lb` t1, `users` t2 WHERE t1.user_id > t2.id AND t2.dff_stm = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment