Interesting TSQL code related to SQL Server