Using Dynamic SQL to Create Database Objects

Say we have a stored procedure that we want to copy across multiple databases. One way would be to create the script and execute in all the databases. But if Databases are many it can be time consuming and efforts to change Database name every time before executing the script will be more. One better way is writing a script that can create the Database object in selected Databases or all Databases at once.
[More]

Query Plan for highest Usecounts

Performance is something every Developer struggles with at some point or other. In order to do optimization we can see query plan. This article will demonstrate as how we can create the function that will show us the query plan and how we can use it to see plans of objects that are highly used

[More]

Tags: , , , , , , , ,

SQL Server | SQL Tricks

APPLY Operator

Apply operator is of two types: Cross Apply and outer apply. Cross Apply is more like left outer join and Outer apply is more like outer join. [More]