Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure to return user tables in database?
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00638154
Message ID:
00638392
Views:
19
>>MS doesn't guarante that structure of the system tables wouldn't change in the future. Here's the query that uses information schema which conforms to the SQL-92 Standard.
SELECT * From INFORMATION_SCHEMA.TABLES
>>	WHERE table_type = 'BASE TABLE'
>>		AND table_name <> 'dtproperties'
>
>Sergey,
>
>Thanks for the info - where would I look to find more information on "INFORMATION_SCHEMA"?


See Information Schema Views in BOL.

>I'd like to do a similiar query to get the names of all the databases on a SQL Server with the exception of the system databases (i.e. master, model, etc.)


You can use
- SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
- system SP sp_helpdb.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform