Guest User

Untitled

a guest
Aug 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. MySQL, rename all the columns of all tables in a db
  2. ALTER TABLE RENAME db.table CHANGE oldID newID INT, CHANGE oldDESC newDESC VARCHAR(50);
  3.  
  4. START TRANSACTION;
  5. SET foreign_key_checks = 0; -- off
  6.  
  7. .. do stuff here
  8.  
  9. SET foreign_key_chekcs = 1; -- on.
  10. COMMIT;
Add Comment
Please, Sign In to add comment