The default can include the wildcard characters (%, _, [] , and [^]) if the procedure uses the parameter with the like keyword.
For example, you can modify showind to display information about the system tables if the user does not supply a parameter, like this:
create procedure showind4 @table varchar(30) = "sys%" as select table_name = sysobjects.name, index_name = sysindexes.name, index_id = indid from sysindexes, sysobjects where sysobjects.name like @table and sysobjects.id = sysindexes.id
Copyright © 2005. Sybase Inc. All rights reserved. |