declare @temp table(ProductID int, SalesOrderID int, SalesOrderDetailID int, OrderQty smallint, primary key clustered (SalesOrderID,SalesOrderDetailID), unique nonclustered (ProductID,SalesOrderID,SalesOrderDetailID)) insert into @temp (ProductID, SalesOrderID, SalesOrderDetailID, OrderQty) select ProductID, SalesOrderID, SalesOrderDetailID, OrderQty from Sales.SalesOrderDetail select temp.SalesOrderID, temp.SalesOrderDetailID, temp.ProductID, temp.OrderQty from @temp as temp where temp.SalesOrderID = 43661 go
--------------------------------------------------------------------------------
--set nocount off
--set nocount on
drop table #tmp
SELECT * into #tmp from dbo.suragch
insert #tmp SELECT name, age from dbo.suragch where name like N'%жар%'
insert #tmp SELECT name, age from dbo.suragch where name like N'%сүх%'
SELECT * from #tmp order by id asc
print @@IDENTITY
No comments:
Post a Comment