Stored procedure create_servers

This script creates a stored procedure that clears the servers table. If the table exists then the table is dropped. After that the table is (re)created. So you end up with an empty table. The script can be run from the SQL Query Analyzer.

CREATE PROCEDURE create_servers  AS

if exists (select * from dbo.sysobjects 
   where id = object_id(N'[dbo].[Servers]')
   and OBJECTPROPERTY(id, N'IsUserTable') = 1)
   drop table [dbo].[Servers]                                                                                                  
                                                                                                                  
CREATE TABLE [dbo].[Servers] (
	[Servername] [varchar] (20) NOT NULL 
) ON [PRIMARY]

ALTER TABLE [dbo].[Servers] WITH NOCHECK ADD 
	CONSTRAINT [PK_Servers] PRIMARY KEY  CLUSTERED 
	(
		[Servername]
	)  ON [PRIMARY] 

GO