Helpful T-SQL Hints!
Found an excellent guide for some of the quirkier moments when you can't get at the Enterprise Manager -- this is one, just to list the tables in a SQL database!
Select Table_name as "Table name"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and Objectproperty (Object_id(Table_name), 'IsMsShipped') = 0
I myself might change the Objectproperty we're looking for (perhaps erroneously!)
Select Table_name as "Table name"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and Objectproperty (Object_id(Table_name), 'IsUserTable') = 1

0 Comments:
Post a Comment
<< Home