Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySQL, rename all the columns of all tables in a db
- ALTER TABLE RENAME db.table CHANGE oldID newID INT, CHANGE oldDESC newDESC VARCHAR(50);
- START TRANSACTION;
- SET foreign_key_checks = 0; -- off
- .. do stuff here
- SET foreign_key_chekcs = 1; -- on.
- COMMIT;
Add Comment
Please, Sign In to add comment