Skip to content

Instantly share code, notes, and snippets.

@syn-arch
Created December 1, 2021 09:12
Show Gist options
  • Save syn-arch/d8ef6df34f6286f9780f557b070830ac to your computer and use it in GitHub Desktop.
Save syn-arch/d8ef6df34f6286f9780f557b070830ac to your computer and use it in GitHub Desktop.
Drop all table on mysql
SELECT concat('DROP TABLE IF EXISTS `', table_name, '`;')
FROM information_schema.tables
WHERE table_schema = 'MyDatabaseName';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment