How to find number of stored procedures, tables ,functions present in a Database?
Please help me finding the above.
select count(*) 
from DatabaseName.information_schema.routines 
where routine_type in ('PROCEDURE', 'FUNCTION', 'TABLE')
                        You can use sys.Tables for the tables, sys.procedures for stored procedures and this answer for functions.
Simply
SELECT COUNT(*) FROM sysobjects WHERE xtype IN ('u', 'p', 'fn')
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With