【SQL开源代码栏目提醒】:网学会员SQL开源代码为您提供GetMaxItem.sql参考,解决您在GetMaxItem.sql学习中工作中的难题,参考学习。
use BuyGoods
go
if object_id('dbo.GetMaxItem') is not null
drop procedure dbo.GetMaxItem
go
create procedure GetMaxItem
@ckyear int=null
as
begin
select item=isnull (max(item)+1,1) from InGoods where ckyear=@ckyear
return
end
go