Count and display number of rows in all tables
This script can be used to display the number of rows of all the tables in a database.
2003-01-02
353 reads
This script can be used to display the number of rows of all the tables in a database.
2003-01-02
353 reads
There isn't a convenient sp or tool in sql server to find out all the tables in a database which have primary keys. This script can help you to list all the tables with primary keys.
2002-10-21
474 reads
By James Serra
Microsoft shared a broad set of Fabric, Power BI, and SQL updates at FabCon...
By Steve Jones
No, I’m not quitting or retiring. Just going on vacation, but I leave tonight...
Comments posted to this topic are about the item Let's Talk Certifications, which is...
The top proficiency testing facility in India is Fare Labs. We employ particular metrics...
Comments posted to this topic are about the item The Hidden Security Risks of...
I have this table in a SQL Server 2025 database:
CREATE TABLE [dbo].[CustomerOrder] ( [OrderID] [int] NULL, [CustomerID] [int] NULL, [total] [money] NULL ) ON [PRIMARY] GOWhat is returned from this code? (answers are for the sum and then the count)
SELECT SUM(total) AS sum,
COUNT(total) AS count
FROM dbo.CustomerOrder;
See possible answers