7>
8>
9> CREATE PROCEDURE spTableExists
10> @TableName VarChar(128)
11> AS
12> IF EXISTS(SELECT * FROM sysobjects WHERE name = @TableName)
13> BEGIN
14> PRINT @TableName + ' exists'
15> PRINT @TableName + ' exists'
16> END
17> ELSE
18> PRINT @TableName + ' does not'
19> GO
1>
2> drop proc spTableExists;
3> GO