When I create a new stored procedure I get an initial example of a stored procedure, what does this section mean? :
CREATE PROCEDURE <Procedure_Name, sysname, ProcedureName>
-- Add the parameters for the stored procedure here
<@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>,
<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
..... ...
I define my stored procedure like this:
CREATE PROCEDURE HumanResources.uspGetEmployees
@LastName nvarchar(50),
@FirstName nvarchar(50)
.....
So what does the above parameters and procedure name default syntax means? (by the way , the default text doesn't execute too).
When you create a new stored procedure using SQL Server Management Studio, it creates the stored procedure using a default template for you.
If you press Ctrl+Shift+M you should get a nice little editor window to specify values for template parameters.
Here is a full list of SQL Server Management Studio Keyboard Shortcuts