Tally Tables in T-SQL
The Tally (or Numbers) table is one of the most useful constructs in intermediate-level SQL. Have you ever written a...
2014-03-27
56,986 reads
The Tally (or Numbers) table is one of the most useful constructs in intermediate-level SQL. Have you ever written a...
2014-03-27
56,986 reads
In today’s blog I will attempt to challenge the popularly held notion that LIKE “%string%” wildcard searches must be slow...
2014-03-26
20,698 reads
In SQL Server 2005, Microsoft introduced the Common Table Expression (CTE). CTEs share similarities with VIEWS and derived tables, but...
2014-03-23
1,616 reads
If you learn one new T-SQL (i.e., Microsoft SQL Server) concept today it should be ROW_NUMBER(). Introduced in SQL 2005,...
2014-03-22
2,972 reads
When you've got only a single effective date on a record and you need to artificially create the effective end date based on a following row in T-SQL, the techniques discussed in this article will help you decide what is best.
2014-03-18
33,875 reads
Follow along as this starter article on the SQL TABLE Type walks you through the various ways it can be used in T-SQL.
2014-03-03
10,498 reads
2014-01-09
2,345 reads
A way to assign variable and overrideable defaults to input parameters to an SP or FUNCTION using a configurations table.
2013-09-03
8,387 reads
2013-09-03
2,458 reads
The SQL MERGE statement can make your DML querying more efficient but you need to take care or you may get burned
2013-04-03
24,661 reads
If you spend your days tuning queries, managing pipelines, or keeping a production database...
I’ve been rebuilding my three-site SQL Server demo lab, and I ran into something...
By SQLPals
SQL Server gMSA: Why DBAs Still Aren't Using It in 2026 ...
Comments posted to this topic are about the item Never is Not the Policy
Comments posted to this topic are about the item Automating SSAS Multidimensional Security Audits...
Comments posted to this topic are about the item Rebuilding All Indexes
I have added a few indexes to one of my tables in SQL Server 2025:
ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
PRIMARY KEY (CustomerID);
-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (phone);
I then do this to disable one index:
alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disableI see this when I check the index status:
I decide to rebuild all indexes with this command:
ALTER INDEX ALL ON dbo.CustomerContactAfter I do this, what will I see for the index status? See possible answers