Mysql不支持
Select * Into new_table_name from old_table_name;
替代方法:
Create table new_table_name Select * from old_table_name where id = -1;
insert into dust select * from student;//已经创建了新表dust的情况下
本文介绍了一种在MySQL中从一个旧表复制数据到新表的方法。由于MySQL不直接支持Select * Into new_table_name From old_table_name这样的语句,文中提供了一个替代方案:先通过Create Table new_table_name Select * From old_table_name Where id = -1;创建新表结构,然后再通过Insert Into new_table_name Select * From old_table_name;来填充数据。
Mysql不支持
Select * Into new_table_name from old_table_name;
替代方法:
Create table new_table_name Select * from old_table_name where id = -1;
insert into dust select * from student;//已经创建了新表dust的情况下
2595
356
607
1万+

被折叠的 条评论
为什么被折叠?