T-SQL

Create a SQL Server partition

How to create a table partition in SQL Server? Let’s consider a large table with Sales data. So, this table have a column that stores the year of the sale and the table stores millions of lines. Let’s consider

T-SQL

Alter View with SQL Server

How to alter a SQL Server view with a T-SQL script? This code example allows you to modify an existing view. All you must do is use the common ALTER VIEW command. For example, to delete a column from

T-SQL

SQL Server INSERT INTO SELECT Query

How to insert data table using insert into queries called from a SQL Server Select? There are 3 solutions to run an INSERT INTO query within a SQL SELECT. The first solution is to insert directly the data with