现有表t1, t2
select into:
select * into t3 from t1;
也就是说select into会将查询结果保存到临时表t3中
insert into:
insert into t2(column1, column2, ....) select column1, column2, .... from t1
insert into 会将查询结果保存到已经存在的表中
select into:
select * into t3 from t1;
也就是说select into会将查询结果保存到临时表t3中
insert into:
insert into t2(column1, column2, ....) select column1, column2, .... from t1
insert into 会将查询结果保存到已经存在的表中
本文对比了SQL中select into与insert into的区别:select into用于将查询结果保存到临时表;而insert into则将查询结果保存到已存在的表中。
240

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



