TSQL – Get Number Of Cores & MaxDOP In Single Query
This is a handy script to show the number of cores and MaxDOP in a single...
This is a handy script to show the number of cores and MaxDOP in a single...
Finding Orphaned Users USE [db] GO EXEC sp_change_users_login ‘Report’ GO Fixing Orphaned Users USE [db] GO...
SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK) FROM TABLE_NAME GROUP BY COL_TO_CHECK HAVING COUNT(COL_TO_CHECK) > 1 If there is more...
This is the basic query text to use whenever you need to loop through a result...
Do transactions apply in dynamic SQL, in SQL Server? In a word, yes. For proof, run...
—- Allow advanced options to be changed. –EXEC sp_configure ‘show advanced options’, 1 –GO —- Update...
There is some controversy about using cursors in TSQL. Overall, I believe they tend to tie...
(If you want to AVOID cursors, see: TSQL – Loop Through Result Set WITHOUT Cursors) This is...