-- 让事务内的处理最小化.CREATE PROCEDURE getdowninfo AS declare @filename varchar(100) declare @tempid int set rowcount 1 begin tran update XH_pdf set @tempid=id,@filename=[filename] where flag=0 and downnow=0 --取出/设置最新的一条 commit transelect @tempid as id,@filename as [filename] --返回该信息return GO
AS
declare @filename varchar(100)
declare @tempid int
set rowcount 1
begin tran
update XH_pdf set
@tempid=id,@filename=[filename]
where flag=0 and downnow=0 --取出/设置最新的一条
commit transelect @tempid as id,@filename as [filename] --返回该信息return
GO