手机
当前位置:查字典教程网 >编程开发 >mssql数据库 >insert into select和select into的使用和区别介绍
insert into select和select into的使用和区别介绍
摘要:insertinto...select...:可将表1中的全部数据或者部分数据复制到表2中。eg:复制代码代码如下:insertintot2...

insert into ... select ...:可将表1中的全部数据或者部分数据复制到表2中。

eg:

复制代码 代码如下:

insert into t2(id,name,pwd)

select id,name,pwd from t1

注:t2必须存在。t1中查询的列名可不与t1列名相同。无 values

select...into:查询t1中的数据,插入到t2中。

eg:

复制代码 代码如下:

select * into t2 from t1

注:t2被创建并填充数据。

【insert into select和select into的使用和区别介绍】相关文章:

SQL Server数据库中的存储过程介绍

sql中translate与replace的区别

MSSQL 2005 安全设置图文教程

sql访问远程数据库

SQL Server数据库之数据库列表介绍

sql中varchar和nvarchar的区别与使用方法

Sql Server中的事务介绍

SQL Select语句完整的执行顺序

久违的SQL标准

SQL Server SQL Agent服务使用教程小结

精品推荐
分类导航