Select stored procedure

N

Nexus

hi, i'm trying to create a select store procedure which
will return a value. These are my codes

CREATE PROCEDURE test

@EmployeeID INT,

AS

SELECT EmployeeID, LastName from tblEmployees Where
EmployeeID = @EmployeeID

How do i write the codes such that it returns the value
of LastName?
 
S

Sylvain Lafontaine

Not sure about what you are asking exactly.

You have a syntax error with an extra comma ( , ) at the end of the line
@EmployeeID INT, but the rest of your SP looks good and you have correctly
put the value of LastName in your SELECT query. So your piece of code looks
right to me.

S. L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top