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
精彩评论