SQL Server insert into select和select into的使用和区别
2022-11-12 09:43:13
内容摘要
这篇文章主要为大家详细介绍了SQL Server insert into select和select into的使用和区别,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!i
文章正文
这篇文章主要为大家详细介绍了SQL Server insert into select和select into的使用和区别,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!
insert into ... select ...:可将表1中的全部数据或者部分数据复制到表2中。eg:代码如下:
1 2 3 4 | <code> insert into t2(id,name,pwd) select id,name,pwd from t1 </code> |
代码如下:
1 2 3 | <code> select * into t2 from t1 </code> |
注:关于SQL Server insert into select和select into的使用和区别的内容就先介绍到这里,更多相关文章的可以留意
代码注释