RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
Feb 8 2008 7:41 PM GMT
by Mrdenny
There's no function, but you can query the system and see what's in there.
SQL 7/2000
To look and see if there are any tables in the database.
SELECT *
FROM sysobjects
WHERE xtype = 'U'
and name <> 'dtproperties' /*This table is used for the database diagrams, so you don't want to delete it.*/
To look and see if there are any views in the database.
SELECT *
FROM sysobjects
WHERE Xtype = 'V'
To look and see if there are any procedures in the database.
SELECT *
FROM sysobjects
WHERE xtype = 'P'
SQL 2005+
To look and see if there are any tables in the database.
SELECT *
FROM sys.tables
To look and see if there are any views in the database.
SELECT *
FROM sys.views
To look and see if there are any procedures in the database.
SELECT *
FROM sys.procedures