I'm using something like:
SELECT COUNT(*) 'Number of System Tables' FROM dbo.sysobjects
WHERE xtype = 's'
to get statistics on database objects but I seem to remember that theres a more efficient way. For example, is there some way to add something like a where clause to the first table returned by sp_help (where Object_type = 'view', for example)?
Thanks,
Dave
SP_TABLES can be used in this csae with parameters for 'Table, system table, or view.'
No comments:
Post a Comment