Table row count using 3 different ways
Three different ways that you can get the count of the rows in a table.
2011-06-16 (first published: 2007-08-16)
6,570 reads
Three different ways that you can get the count of the rows in a table.
2011-06-16 (first published: 2007-08-16)
6,570 reads
To merge data in SQL 2005 from various table, we do not have a MERGE function as in SQL 2008. The following script gives an alternative approach of implementing in SQL 2005
2011-06-15 (first published: 2011-06-03)
1,445 reads
2011-06-14 (first published: 2007-12-05)
5,982 reads
2011-06-13 (first published: 2008-04-19)
5,854 reads
A stored procedure for restoring a database up to the latest log backup from a file folder. Compatible with the backups made by standard SQL maintenance plan.
2011-06-10 (first published: 2011-05-27)
1,581 reads
When creating a backup that will be restored to a development database, you may need to mask PII information. This script will help you with that.
2011-06-09 (first published: 2011-05-25)
1,463 reads
Easily remove duplicate records without temp tables by using a CTE.
2011-06-07 (first published: 2008-03-19)
6,941 reads
2011-06-03 (first published: 2008-08-18)
1,094 reads
2011-06-02 (first published: 2008-04-24)
9,291 reads
2011-06-01 (first published: 2007-09-02)
10,482 reads
Disclaimer: The following is built with Claude Code. Just need to justify my $100/mo...
By Brian Kelley
I developed these rules a while back, before COVID. I had a period of...
By Steve Jones
Someone asked why I would use TRY_PARSE after I posted a question at SQL...
Hub Via Wa:628217555651 Alamat Jl. Ahmad Yani No.9, RT.01/RW.05, Marga Jaya, Kec. Bekasi Sel.,...
I have a table that ends in ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]. I'm about to...
Comments posted to this topic are about the item OUTER APPLY Fundamentals: Part 2
I have this data in the OrderHeader table in a SQL Server 2025 database (ordered by CustomerID ASC):
orderid orderdate customerid complete 3 2025-05-10 00:00:00.0002 1 21 2024-01-10 00:00:00.0003 1 15 2023-10-28 00:00:00.0004 1 13 2025-03-08 00:00:00.0006 1 11 2024-04-02 00:00:00.0007 1If I run this query, how many rows are returned?
SELECT * from dbo.OrderHeader where customerid between 3 and '6'See possible answers