Created
August 25, 2016 01:19
-
-
Save dtateii/08ff37f9087171316c933fd20b91ea59 to your computer and use it in GitHub Desktop.
Prefix All Database Tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Concat('ALTER TABLE ', TABLE_NAME, ' RENAME TO my_prefix_', TABLE_NAME, ';') FROM information_schema.tables WHERE table_schema = 'my_database_name' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment