Hello. Hope you are doing good. In this post we will learn how to create an SQL stored procedure with input parameter.
Consider following steps:
- Use create procedure command to create procedure like "create procedure abc"
- Define input parameter with @ to denote parameter values like '@Name varchar(15)', note that @Name is a parameter of type varchar with 15 character length. You can add multiple parameters by separating each with a comma (,)
- Write the SQL command you want the procedure to execute. For this example we will print name with today's date:
create procedure showDateWithName
No comments:
Post a Comment