|
Posted by Erland Sommarskog on 03/09/06 00:47
SQL (denis.gobo@gmail.com) writes:
> optional parameters have to be at the end of a stored proc
> CREATE PROCEDURE get_sales_for_title
> @something int,
> @title varchar(80) = NULL
>
> AS
No, there is now such law. While it may be practical to have parameters
with default value at the end, this is perfectly legal:
CREATE PROCEDURE some_sp @x int = NULL, @u INT AS
...
go
EXEC some_sp @u = 123
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|