原来没有的创建的表
select * into 表A form 表B where条件
原来存在的表
insert into 表A select * from 表B where 条件
INSERT INTO 表A (表A中字段1,表A中字段2...)SELECT (表B中对应字段1,表B中对应字段2...) FROM 表B
例子:
INSERT INTO [RYTreasureDB].[dbo].[ShareDetailInfo] ([OperUserID] ,[ShareID] ,[UserID] ,[GameID] ,[Accounts] ,[OrderID] ,[OrderAmount] ,[DiscountScale] ,[PayAmount],[Currency] ,[IPAddress] ) SELECT [OperUserID],[ShareID] ,[UserID] ,[GameID] ,[Accounts] ,[OrderID] ,[OrderAmount] ,[DiscountScale] ,[PayAmount] ,[Currency] ,[IPAddress] FROM [RYTreasureDB].[dbo].[OnLineOrder] where OrderID='APP20180803161806183015224'