SQL SERVER – Find Table in Every Database of SQL Server – Part 2

Yesterday I wrote about SQL SERVER – Find Table in Every Database of SQL Server. Today we will see another method how we can achieve the same result using Information_Schema view. Refer my previous article here for additional information. CREATE PROCEDURE usp_FindTableNameInAllDatabase @TableName VARCHAR(256) AS DECLARE @DBName VARCHAR(256) DECLARE @varSQL…
Read More

SQL SERVER – Join Better Performance – LEFT JOIN or NOT IN?

First of all answer this question : Which method of T-SQL is better for performance LEFT JOIN or NOT IN when writing a query? The answer is: It depends! It all depends on what kind of data is and what kind query it is etc. In that case just for fun guess one option LEFT JOIN or NOT IN. If you need to refer the query which demonstrates the mentioned clauses, review following two queries for Join Better Performance.

Read More

SQL SERVER – 2005 – Find Database Collation Using T-SQL and SSMS – Part 2

Previously I have written two different ways to find database collation SQL SERVER – 2005 – Find Database Collation Using T-SQL and SSMS. One of blog reader jwwishart has posted another method for doing the same. SELECT collation_name FROM sys.databases WHERE name = 'AdventureWorks' Reference : Pinal Dave (https://blog.sqlauthority.com)
Read More