A filegroup read-only setting prevents writes to objects stored there. A customer asked whether a table could be protected this way.
Counting Objects by Type in Every Database With One Query
One loop and one pivot give you tables, views, procedures and functions for every database. A planted demo database proves the counts.
SQL SERVER – Find Business Days Between Dates
Business Days Between Dates require a defined calendar and endpoint rule. This example counts inclusive Monday-to-Friday dates for July 2021.
One Scan for 3 Count Sum – SQL in Sixty Seconds #178
Well, the answer is pretty straight forward and that is what we are going to see in today’s video of One Scan for 3 Count Sum.
Conditional Aggregation: Several Counts in One Pass With CASE
Use conditional aggregation for several ticket counts, avoid COUNT with ELSE zero, and calculate percentages with an explicit denominator.
COUNT(*) and Index Frequently Asked Questions
My Index Frequently Asked Questions discussion follows the counting video. I distinguish exact results, estimates and the expression being counted.
Count Rows in a Heap: Which Scan Does SQL Server Use?
Count rows in a heap and SQL Server scans every page. See the plan change with a clustered and a narrow index, and why a heap does not compact its pages.







