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:
00638180
Views:
20
>>In general, it is not recommended that you access the system tables directly.
>>
>>But...this query will get what you want:
>>
>>SELECT * FROM sysobjects WHERE type='U'
>>
>>-Mike
>
>Thanks - just what I was looking for! By the way, I can understand why you shouldn't change anything in the system tables - but what harm is there in running a select query?
>
>Al

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'
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform