snehal suryavanshi

snehal suryavanshi

  • NA
  • 341
  • 113.6k

Store Procedure with one parameter

Jul 6 2018 12:59 AM
I am new to sql server and learning store procedure 
i m creating store procedure for fetching data of perticuler ID
as follow 
  1. CREATE PROCEDURE SelectByID @ID INT  
  2. AS  
  3.  BEGIN  
  4.   
  5. SELECT *   
  6. FROM EmployeeDetails  
  7. WHERE EmployeeID = @ID  
  8.   
  9. RETURN  
  10. END  
  11.   
  12. GO;  
there is problem while execution
 
Exec SelectByID ID = "4"; 
 
Please help me out  it is showing error like "Incorrect Syntax near '=' ". 

Answers (5)