在存储过程中,我不想插入ID的值该怎么修改
ALTERPROCEDUREpro_InsertA(@In_IDint,@In_Namevarchar(20),@In_Sexvarchar(2),@In_Address...
ALTER PROCEDURE pro_InsertA
(
@In_ID int,
@In_Name varchar(20),
@In_Sex varchar(2),
@In_Address varchar(50),
@In_Phone varchar(11),
@In_Number varchar(20),
@In_Status varchar(10),
@errorinfo varchar(200) OUTPUT
)
AS
BEGIN
--DECLARE @errorinfo varchar(200)
set @errorinfo = ''
INSERT INTO Information (S_Name,S_Sex,S_Address,S_Phone,S_Number)
VALUES(@In_Name,@In_Sex,@In_Address,@In_Phone,@In_Number)
IF (@@error <> 0)
BEGIN
SET @errorinfo = '插入数据异常!'
END
SET @errorinfo = '插入数据成功!'
END
In_ID,In_Status ,我不想插入值,因为ID是自增长,后面那个是用来判断一个状态的 展开
(
@In_ID int,
@In_Name varchar(20),
@In_Sex varchar(2),
@In_Address varchar(50),
@In_Phone varchar(11),
@In_Number varchar(20),
@In_Status varchar(10),
@errorinfo varchar(200) OUTPUT
)
AS
BEGIN
--DECLARE @errorinfo varchar(200)
set @errorinfo = ''
INSERT INTO Information (S_Name,S_Sex,S_Address,S_Phone,S_Number)
VALUES(@In_Name,@In_Sex,@In_Address,@In_Phone,@In_Number)
IF (@@error <> 0)
BEGIN
SET @errorinfo = '插入数据异常!'
END
SET @errorinfo = '插入数据成功!'
END
In_ID,In_Status ,我不想插入值,因为ID是自增长,后面那个是用来判断一个状态的 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询