Skip to content

Instantly share code, notes, and snippets.

@yeisoncruz16
Created March 11, 2021 17:06
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 yeisoncruz16/9c67bab150481cfd2f4f10c4e04b219b to your computer and use it in GitHub Desktop.
Save yeisoncruz16/9c67bab150481cfd2f4f10c4e04b219b to your computer and use it in GitHub Desktop.
How to truncate Large Mysql Tables
CREATE TABLE new_foo LIKE foo;
RENAME TABLE foo TO old_foo, new_foo TO foo;
DROP TABLE old_foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment