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
| DROP PROCEDURE IF EXISTS moveTables; | |
| DROP PROCEDURE IF EXISTS renameDatabase; | |
| DELIMITER $$ | |
| CREATE PROCEDURE moveTables(_schemaName varchar(100), _newSchemaName varchar(100)) | |
| BEGIN | |
| DECLARE done INT DEFAULT FALSE; | |
| DECLARE table_name VARCHAR(64); | |
| DECLARE table_cursor CURSOR FOR SELECT information_schema.tables.table_name FROM information_schema.tables | |
| WHERE information_schema.tables.table_schema = _schemaName; |