开发者

bit Data type usage in Stored procedure

开发者 https://www.devze.com 2023-04-11 03:20 出处:网络
I want to capture Radio button values in db so i created table with datatype bit But the problem when am create stored Procedure as

I want to capture Radio button values in db so i created table with datatype bit But the problem when am create stored Procedure as

CREATE PROCEDURE Mt_Vacancy_mainPreference_insert

    (
    @post_name varchar(20),@pref开发者_如何学Goerence varchar(20),gender bit,No_of_vac int
    )

AS
    Begin
    insert into Mt_Vacancy_mainPreference values(@post_name, @preference, @gender, @No_of_vac)
    end
    RETURN

It says Incorrect Sytax near gender Must produce scal value What is the problem


You are missing the @ prefix for your last 2 parameter names.


You forgot to decorate the input variables;

gender bit,No_of_vac int

Should be

@gender bit, @No_of_vac int
0

精彩评论

暂无评论...
验证码 换一张
取 消