SQL SERVER TOTAL ROW AND COLUMN COUNT

SQL SERVER TOTAL ROWS / COLUMN COUNT

GET TOTAL ROWS COUNT OF A TABLE

SELECT COUNT(*) as TOTAL_TBL_ROWS FROM [ORDER]

GET TOTAL COLUMNS COUNT OF TABLE

SELECT COUNT(*) as TOTAL_TBL_COLUMNS FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME= 'ORDER'

OR


SELECT COUNT(*) AS TOTAL_TBL_COLUMNS FROM INFORMATION_SCHEMA.COLUMNS
       WHERE TABLE_CATALOG = 'MDM'
            AND TABLE_SCHEMA = 'dbo'
            AND TABLE_NAME = 'ORDER'



ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book