请教这一存储过程???
请问这一段存储过程意思是什么?希望高手给与指点。
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[DeleteCameraType]
@CT_ID bigint,
@Reint int output
as
begin
--系统数据不能删除 07-08-04
if @CT_ID<=3
begin
set @Reint=-3
return
end
declare @CountSon int
set @Reint=-1
select @CountSon=Count(*) from Camera where CT_ID=@CT_ID
--有镜头不能删除
if @CountSon>0
begin
set @Reint=-2
return
end
delete from CameraType where CT_ID=@CT_ID and CT_ID > 3
set @Reint=0
end
GO