Insert into certain columns
This question already has an answer here:
insert into table2
(
col2, col3, col4
)
select col1, col2, col3
from table1
You can combine select and insert in order to do this. This is how:
insert into table2 (col2, col3, col4)
select col1, col2, col3
from table1
你只需要在INSERT
使用SELECT...FROM
来选择你想要的列。
INSERT INTO table2
(
column2, column3, column4
)
SELECT column1, column2, column3
FROM table1
链接地址: http://www.djcxy.com/p/94308.html
上一篇: 在INSERT INTO内部选择
下一篇: 插入某些列