How do I write a stored procedure to declare the following variables @Phone and @CustomerID to equal the Customer's table's fields Customer.phone and Customer.customerID?
Create proc somename
@Phone varchar(14),
@CustomerID int
as
select * from customer where phone = @phone and customerid = @customerid
or
Code:
Create proc somename
as
declare @Phone varchar(14),@CustomerID int
set @phone ='219 123 1234'
set @customerid = '1234'
select * from customer where phone = @phone and customerid = @customerid
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.