• The values in sysstat refer to what type of object it is. 3 means it's a user table. But I would advise against using this column in your scripts, because first of all in SQL 2005 you should work with sys. objects which doesn't have a sysstat column and second Microsoft can change the values in a future version.

    The proper way of checking it is a user table would be using the OBJECTPROPERTY function.

    IF EXISTS (SELECT * FROM sys.objects WHERE name ='mytbl'

    AND OBJECTPROPERTY(OBJECT_ID('dbo.mytbl'),'IsUserTable')=1)

    DROP TABLE dbo.mytbl

    [font="Verdana"]Markus Bohse[/font]