This SQL server script will display all of the SQL user type tables in a given database using DatabaseName and SqlQuery variables.
SQL Query:
Declare @DatabaseName SysName
Declare @SqlQuery VarChar(200)
-- Change SMS_XXX To The Database you wish to query
Set @DatabaseName='SMS_XXX'
Set @SqlQuery='Select Table_Name as Tables From ' + @DatabaseName + '.Information_Schema.Tables
Where Table_Type = ''Base Table'''
Exec (@SqlQuery)
No Comments