Wednesday, 23 March 2011

Query to count total number of stored procedures,tables and Views in database

When you want to count the total number of stored procedures in your database

the solution is

select count(*) as 'total' from sysobjects where xtype='P'

Note: where xtype='p' for stored procedures

xtype='V' for views

xtype='U' for tables

No comments:

Post a Comment