create proc data @product varchar(50) as begin if exists(select product from Tablename where product=@product) select '1' as status else insert into tablename(product) values(@product) select '2' as status end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)