Interview Question of the Week #046 – How @@DATEFIRST and SET DATEFIRST Are Related?

Question: How @@DATEFIRST and SET DATEFIRST are related? Answer: The master database’s syslanguages table has a DateFirst column that defines the first day of the week for a particular language. SQL Server with US English as default language, SQL Server sets DATEFIRST to 7 (Sunday) by default. We can reset any day…
Read More

Interview Question of the Week #044 – What is the difference of performance between SELECT and SET?

Question: What is the difference of performance between SELECT and SET? Answer: SELECT : Designed to return data. SET : Designed to assign values to local variables. While testing the performance of the following two scripts in query analyzer, interesting results are discovered. SET @foo1 = 1; SET @foo2 =…
Read More

SQL SERVER – What is the OVER Clause? – Notes from the Field #101

[Note from Pinal]: In this episode of the Notes from the Field series database expert Kathi Kellenberger explains about T-SQL Over clause. Kathi is an amazing instructor, she was the SQL author I have read in my early career. The reason, I love SQL Server because her writing has instigated love for this technology in me. Today she brings a relatively interesting topic for database experts. Read the experience of Kathi in her own words.

Read More