<p>I have a DTS package that drops a table then creates it and populates it but sometimes something happens and the package fails after the drop table.  If it's rerun it fails cuz the table hasn't been created yet.  </p>

<p>Is there something like "if exists" for SQLServer 2000 like in MySQL?</p>

<p>thanks.</p>

```
```
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TableName]') AND type in (N'U'))
DROP TABLE TableName;
GO
```
```
You can check a
list of type definitions in the sys.objects table here
if you want to check if other objects in your database exist.