T-SQL

Drop a SQL Server View

How to drop a SQL Server view with a T-SQL query? The DROP VIEW command allows you to simply delete an existing view with a T-SQL script run from SQL Server Management Studio (SSMS). The script below is an

T-SQL

Disable an index in SQL Server

How to disable an index in SQL Server? To disable an index for performance reasons, use this code and adjust it to your index and table names. For instance, let’s consider a large sales table, with million lines. Let’s

T-SQL

Create a SQL Server index

Create an index in SQL Server to improve the performance of queries on tables and in clustered views. Two types of indexes exists, the clustered and the nonclustered one. To create a non-clustered index, use this example and adapt

T-SQL

Clustered index in SQL Server

What is a SQL Server clustered index ? The definition of a SQL Server index is a structure, i.e. a file, stored physically in a disk. It’s like the master data file and the log data file that composes