What about this:
SELECT COUNT(*) FROM sys.tables WHERE is_ms_shipped=0
One problem is that "sysdiagrams" is not marked as is_ms_shipped=1. If you don't want to include it, add name <>'sysdiagrams' condition.
|||SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE LIKE 'BASE%'
No comments:
Post a Comment