Tuesday, December 16, 2014

In MS SQL, how to count total number of major objectsr, such as table, view, store procedure etc?

Select type_desc as Type, COUNT(*) AS Count from SYS.OBJECTS
Where type_desc not in ('SYSTEM_TABLE','INTERNAL_TABLE','SERVICE_QUEUE')
group by type_desc

No comments:

Post a Comment