问题描述
1、如何复制表得数据接口,并且指定所需字段。
2、将 a 表复制为 b 表,数据结构相同,但需指定字段。 网址:yii666.com
解决方案
1、从 a 表复制结构到 b 表,只复制字段 id,name,content
CREATE TABLE b AS SELECT id,name,content FROM a
2、从 a 表发展内容到 b 表,只复制字段 id,name,content
INSERT INTO b SELECT id,name,content FROM a;
文章地址https://www.yii666.com/learning/mysql/44.html文章来源地址:https://www.yii666.com/learning/mysql/44.html