| Author: Suresh Babu 22 Jul 2004 | Member Level: Bronze Points : 0 |
Microsoft does not recommend the direct use of System tables. SQL Server 2000 was released with many system views. So, the scrpt can be re-written as
CREATE PROCEDURE mysp_GetAllTableNames AS Select Table_Name from INFORMATION_SCHEMA.TABLES where table_Type='BASE TABLE' and Table_Name <> 'dtProperties' GO
If the stored procedure is not added in the master database, do not use the prefix sp_ for stored procedures. It has a performance overhead. Thanks, Suresh
|