我在看别人的代码,有一个存储过程,我在数据库中右键存储过程--修改后打开是这样的:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[ReverseForm]
@CreatorIDint,
@FIDintOUTPUT,
@FormNumberint=0OUTPUT
AS
DECLARE @FormTypeIDtinyint
DECLARE @MaxID int
DECLARE @SystemDateDateTime
DECLARE @StoreIDint
-- Find the current formtype and storeid
SELECT @StoreID=StoreID,@FormTypeID=FormTypeID FROM Form WHERE FID=@FID
-- Find the store's systemdate
SELECT @SystemDate=Convert(char(10),getdate(),120)
-- Get the next formnumber for the current store and current formtype
SELECT @MaxID = MAX(FormNumber) FROM Form WHERE FormTypeID=@FormTypeID AND StoreID=@StoreID
IF @MaxID is NULL
SET @FormNumber = 1
ELSE
SET @FormNumber = @MaxID + 1
INSERT INTO Form (StoreID,FormTypeID,FormNumber,RelatedFID,ContractNumber,ClientID,
WarehouseID,WarehouseID2,CreatorID,SalesID,NoTaxSum,TaxSum,SystemDate,
SystemTime)
SELECT StoreID,@FormNumber,@CreatorID,@SystemDate,GETDATE() FROM Form WHERE FID=@FID
SELECT @FID = @@IDENTITY
我看不懂了,文中红色字体不是插入一条语句的意思吗?怎么没Value(......)这些? 他这个是什么意思?
哪个知道?教一下我这个初学者。
原文链接:https://www.f2er.com/vb/259668.html