Count number of tables, stored procedure, function and views in sql database
To count number of Tables in sql database
SELECT COUNT(*) FROM information_schema.tables WHERE Table_Type = 'Base Table'
To count number of Procedures in sql database
SELECT COUNT(*) FROM information_schema.routines WHERE Routine_Type = 'Procedure'
To count number of Functions in sql database
SELECT COUNT(*) FROM information_schema.routines WHERE Routine_Type = 'Function'
To count number of Views in sql database
SELECT COUNT(*) FROM information_schema.views
This is really working.I got my solution also.Thanks alot...
ReplyDeleteNice post. Thank you very much.
ReplyDelete