SQL SERVER – INSERT TOP (N) INTO Table – Using Top with INSERT
SQL SERVER – Introduction to Rollup Clause
In this article we will go over basic understanding of Rollup clause in SQL Server. ROLLUP clause is used to do aggregate operation on multiple levels in hierarchy. Let us understand how it works by using an example.
SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)
SQL SERVER – Recompile Stored Procedure at Run Time
I recently received an email from reader after reading my previous article on SQL SERVER – Plan Recompilation and Reduce Recompilation – Performance Tuning regarding how to recompile any stored procedure at run time. There are multiple ways to do this. If you want your stored procedure to always recompile at run time, you can add the keyword RECOMPILE when you create the stored procedure. Additionally, if the stored procedure has to be recompiled at only one time, in that case, you can add RECOMPILE word one time only and run the SP as well. Let us go over these two options.
SQL SERVER – Plan Recompilation and Reduce Recompilation – Performance Tuning
SQL SERVER – Stored Procedure Optimization Tips – Best Practices
We will go over how to optimize Stored Procedure with making simple changes in the code. Please note there are many more other tips, which we will cover in future articles.