Posted in Admin T-SQL

Performance Tuning Tip#2

Tip:┬áDo not use Order by unless the output is not required in sorted format. If ‘Order by’ is required then include only required columns in…

Continue Reading... Performance Tuning Tip#2
Posted in Admin T-SQL

Performance Tuning Tip#1

Tip: Never use functions/Calculations/Formula on the left side of Where clause or in Join Predicate. Demo: I am using Production.TransactionHistory Table in AdventureWorks2017 database. You…

Continue Reading... Performance Tuning Tip#1
Posted in T-SQL

ROW_NUMBER(),RANK() AND DENSE_RANK()

Introduction: There are three SQL functions that allow us to assign the row numbers to rows in query output based on our requirement. These functions…

Continue Reading... ROW_NUMBER(),RANK() AND DENSE_RANK()
Posted in T-SQL

Error Handling in SQL

Introduction: In this demo, We will understand the error handing in procedures. Lets start with demo without wasting any time in discussing something that is…

Continue Reading... Error Handling in SQL
Posted in T-SQL

Unpivot in SQL

Un-pivot is to convert column data in to row data. I will recommend to check my blog Here on pivot in SQL before learning Un-pivot….

Continue Reading... Unpivot in SQL
Posted in T-SQL

Pivot in SQL

Introduction Pivots are used to convert row data to column data Demo Lets create a table first CREATE Table Sales (SalesPerson varchar(50), Region varchar(20), Sale…

Continue Reading... Pivot in SQL