Skip to content

Instantly share code, notes, and snippets.

@neewbee
Created September 28, 2017 07:39
Show Gist options
  • Select an option

  • Save neewbee/27a96f0dc035940e32b120a57bf4b962 to your computer and use it in GitHub Desktop.

Select an option

Save neewbee/27a96f0dc035940e32b120a57bf4b962 to your computer and use it in GitHub Desktop.
batch delete database
SELECT CONCAT('DROP DATABASE `', SCHEMA_NAME, '`;')
FROM `information_schema`.`SCHEMATA`
WHERE SCHEMA_NAME LIKE 'cms_%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment