Monday, 21 August 2017

Count Number Of Tables, Views, Stored Procedures, Functions By Query In A Database (MY SQL)

8/21/2017 - By Pranav Singh 0

This article will show you how you can get the no of tables, Views, Stored Procedures, Functions in a Database like my sql, ms sql.



So here are the query which is used for getting the count of different database objects.

COUNT NO TABLE QUERY



SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'Your Table Name';




COUNT NO VIEW QUERY



SELECT COUNT(*) AS VIEW_COUNT FROM INFORMATION_SCHEMA.VIEWS




COUNT NO STORED PROCEDURE QUERY



SELECT COUNT(*) AS PROCEDURE_COUNT FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'PROCEDURE'




COUNT NO FUNCTION QUERY


SELECT COUNT(*) AS FUNCTION_COUNT FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'FUNCTION'



About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top