mysql select into使用

来源:互联网 发布:表格文字识别软件 编辑:程序博客网 时间:2024/05/16 11:15
问题:要复制一张表中的部分字段到一张新表中去,并在新表中新增一个字段id,自动增加。

1.首先想到的是用select into,但是MYSQL不支持这一语法
MYSQL不支持:
        Select * Into new_table_name from old_table_name;
替代方法:
        Create table new_table_name (Select * from old_table_name);