mysql - what is the difference between 'alter table rename' and 'rename table'? -
i using mysql. here's example, want rename table b, what's difference between following statement:
alter table rename b; and one:
rename table b; can give detail compare between them? vary based on different engine?
as documented under alter table syntax:
for
alter table tbl_name rename new_tbl_namewithout other options, mysql renames files correspond tabletbl_namewithout making copy. (you can userename tablestatement rename tables. see section 13.1.32, “rename tablesyntax”.) privileges granted renamed table not migrated new name. must changed manually.
as documented under rename table syntax:
you cannot use
renamerenametemporarytable. however, can usealter tableinstead:mysql> alter table orig_name rename new_name;
there no other differences.
Comments
Post a Comment