How to count list of the tables in SQL Server Database

Get the total number of table count in Database

USE yourDataBaseName
SELECT COUNT(*) from information_schema.tables
WHERE table_type = 'base table'

Get the total number of table Name in Database

USE yourDataBaseName
GO
SELECT *
FROM sys.Tables
GO

No comments:

Post a Comment