I thought that.
But according to this article (
"The default can include wildcard characters (%, _, [] and [^]) if the stored procedure uses the parameter with the LIKE keyword."
"The following variation of the stored procedure au_info has defaults with wildcard characters for both parameters:
CREATE PROC au_info2 @lastname varchar(30) = 'D%',
@firstname varchar(18) = '%'
AS
SELECT au_lname, au_fname, title, pub_name
FROM authors INNER JOIN titleauthor ON authors.au_id = titleauthor.au_id
JOIN titles ON titleauthor.title_id = titles.title_id
JOIN publishers ON titles.pub_id = publishers.pub_id
WHERE au_fname LIKE @firstname
AND au_lname LIKE @lastname
If au_info2 is executed with no parameters, all the authors with last names beginning with the letter D are displayed:
EXECUTE au_info2
GO"
I don't know what I'm doing wrong but this is not working for me!