加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

vb中的存储过程的疑问

发布时间:2020-12-16 22:23:52 所属栏目:大数据 来源:网络整理
导读:我在看别人的代码,有一个存储过程,我在数据库中右键存储过程--修改后打开是这样的: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER PROCEDURE [dbo].[ReverseForm] @CreatorIDint, @FIDintOUTPUT, @FormNumberint=0OUTPUT AS DECLARE @FormTypeIDt

我在看别人的代码,有一个存储过程,我在数据库中右键存储过程--修改后打开是这样的:

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(......)这些? 他这个是什么意思?

哪个知道?教一下我这个初学者。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读