--复制结构+数据 select * into 数据库名.dbo.新表名 from 数据库名.dbo.原表名 select * into Stockholder.dbo.SHInfo from dspring.dbo.HIREMEN --只复制结构 select * into 数据库名.dbo.新表名 from 数据库名.dbo.原表名 where 1=0 后面的条件只要不成立就OK了 Learn From: http://www.cnblogs.com/New-world/archive/20
delete FROM [GCSDB_ZYB].[dbo].[EMPLOYEES] SET IDENTITY_INSERT [GCSDB_ZYB].[dbo].[EMPLOYEES] on insert [GCSDB_ZYB].[dbo].[EMPLOYEES] ( [PK_EMPLOYEE_ID] ,[FK_EMPLOYEE_TYPE_ID] ,[ORG_NO] ,[EMPLOYEE_COMPANY] ,[EMPLOYEE_CODE]
https://blog.csdn.net/yali1990515/article/details/50969117 创建dblink -- Create database link create shared database link COPYCITY_BZTOMY connect to db_A identified by db_A authenticated by db_B identified by db_B using '192.168.0.141/orcl'; --说明有两个数据库
Insert是T-sql中常用语句,Insert INTO table(field1,field2,...) values(value1,value2,...)这种形式的在应用程序开发中必不可少.但我们在开发.测试过程中,经常会遇到需要表复制的情况,如将一个table1的数据的部分字段复制到table2中,或者将整个table1复制到table2中,这时候我们就要使用SELECT INTO 和 INSERT INTO SELECT 表复制语句了. 1.INSERT INTO SELECT语句 语