Reputation: 61
I have one input parameter categoryid
.
I want to create a stored procedure for categoryfetch
with this input parameter. I have a table category
with columns categoryid
, shopid
, title
, logicalcode
.
Can any one tell the stored procedure for category fetch with one input parameter?
Upvotes: 0
Views: 223
Reputation: 159
create procedure categoryfetch
@categoryid int
as
select shopid,title,logicalcode
from category where categoryid=@categoryid end
for execute it
exec categoryfetch @categoryid=categoryid
Upvotes: 0
Reputation: 59463
create procedure categoryfetch
@categoryid int
as
select categoryid, shopid, title, logicalcode
from category
where categoryid = @categoryid
go
Upvotes: 2