Friday 11 October 2013

03. Create a stored procedure that accepts the name of a product and display its ID, number, and availability.

create Proc ProductList @name Varchar(50)
as
begin
Print 'Product details'
select ProductID,ProductNumber,MakeFlag as Availability
from Production.Product
Where Name=@name
end

Execute ProductList 'Keyed Washer'

No comments:

Post a Comment