Skip to content

Instantly share code, notes, and snippets.

@kfitfk
Created November 28, 2013 03:16
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 kfitfk/7686780 to your computer and use it in GitHub Desktop.
Save kfitfk/7686780 to your computer and use it in GitHub Desktop.
Empty a mysql table
CREATE TABLE cloned LIKE the_table_to_drop;
RENAME TABLE the_table_to_drop TO drop_me, cloned TO the_table_to_drop;
DROP TABLE drop_me;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment