日期:2014-05-17 浏览次数:20533 次
declare @ReturnID int
@ReturnID 值是从一个表查询出最大ID然后加一
INSERT INTO #TB_ReportField(ReportTicketID ,OrderNo,OrderName)
select @ReturnID as ReportTicketID,
OrderNo,OrderName
from #TmpReportData
CREATE TABLE #TB_ReportField
(ReportTicketID INT IDENTITY(1,1)?,
OrderNo VARCHAR(10),
OrderName VARCHAR(10))
?INSERT?INTO??#TB_ReportField(OrderNo,OrderName)
select?OrderNo,OrderName
from?#TmpReportData??