开发者

bit Data type usage in Stored procedure

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜