您的位置首页生活百科

在sql中 insert into 中能插入select 语句吗

在sql中 insert into 中能插入select 语句吗

的有关信息介绍如下:

在sql中 insert into 中能插入select 语句吗

可以的。例如:Insert into A Select * From B; 注意:这里要求A和B的表结构是一样的。如果不一样,则需要使用:Insert into A(C1,C2,...) Select C1,C2,... From B;这里C1、C2分别指A表与B表字段大小和类型都相同的列。