2015

Query Performance Tuning – General Guidelines

Query performance tuning – Introduction Query performance tuning is a process of improving system performance to make it faster and more scalable. It is a creative and iterative process which has a clear and well-defined objective. To achieve this goal, we have to follow certain defined steps. Why we need this Enterprise data changes frequently over

Query Performance Tuning – General Guidelines Read More »

Order max and min value rows alternatively in SQL Server

In this blog post “Order max and min value rows alternatively in SQL Server”, we are going to learn how we can order the rows of a table by combining max and min value rows alternatively. For example, from an employee table based on the salary column, we need to extract the records ordered as; First row: First highest salary Second row: First lowest

Order max and min value rows alternatively in SQL Server Read More »

Add constraint without checking existing data

In this post “Add constraint without checking existing data” we are going to learn how we can add a constraint on a column which already has invalid data. We create constraints to automatically enforce the integrity of the database. Using constraints we can define the rules for valid set of values for a given column. Let’s learn

Add constraint without checking existing data Read More »

Change chart type dynamically SSRS

Today, we are going to learn how we can change chart type dynamically depending on the selected value in the report parameter in SSRS (SQL Server Reporting Services) report. Report parameter has few predefined chart type as values in the report, and depending on the selected value in the parameter, chart renders in the report. We know

Change chart type dynamically SSRS Read More »

Index on computed column

Today, we are going to learn how we can create index on a computed column which improves the performance of SELECT queries. To create a computed column, we will use an user defined function instead of inline code. Also to know about computed columns, refer my previous blog post “What is Computed Column in sql server“. Create index

Index on computed column Read More »

Convert existing table to temporal table

In the previous post, we have discussed the temporal table, which is introduced in SQL Server 2016 to store the time varying data (current data and the data change history along with the time period). There, we have also learnt how we can create a temporal table from scratch. In this post “Convert existing table to temporal

Convert existing table to temporal table Read More »

Temporal Table in SQL Server

In this post we are going to discuss “Temporal Table”, a new feature introduced in SQL Server 2016. Lets start this post “Temporal Table in SQL Server” with the definition of temporal table. Temporal Table facilitates inbuilt support for data change tracing along with the time period in a table. It holds the current as well as historical data to determine the

Temporal Table in SQL Server Read More »

SELECT Statement

Now that we have been familiar with Create, Alter and Drop – Database and Table, it is time to be familiar with T-SQL statements. Let’s start this chapter with the definition of T-SQL followed by a detailed discussion on T-SQL’s SELECT statement. Transact SQL (T-SQL) Transact SQL (T-SQL) is a proprietary extension of SQL (structured Query Language) by Microsoft

SELECT Statement Read More »