Select stored procedure

  • Thread starter Thread starter Nexus
  • Start date Start date
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?
 
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.
 
Back
Top