Earlier I wrote about SQL SERVER – Datetime Function SWITCHOFFSET Example. After reading this blog post, I got another quick reply that if I can explain the usage of TODATETIMEOFFSET as well.
SQL SERVER – Datetime Function SWITCHOFFSET Example
I was recently asked if I know how SWITCHOFFSET works. This feature only works in SQL Server 2008. Here is quick definition of the same from BOL: Returns a datetimeoffset value that is changed from the stored time zone offset to a specified new time zone offset. What essentially it…
Read MoreSQL SERVER – The Self Join – Inner Join and Outer Join
Self Join has always been an note-worthy case. It is interesting to ask questions on self join in a room full of developers. I often ask – if there are three kind of joins, i.e.- Inner Join, Outer Join and Cross Join; what type of join is Self Join? The…
Read MoreSQL SERVER – Upper Case Shortcut SQL Server Management Studio
Few days ago, I received code which is very similar to code shown below. select * from Sales.SalesOrderDetail where ProductID > 777 I am not the guy who go crazy for formatting but I do appreciate proper coding. I like if the code was formatted like below. SELECT * FROM…
Read MoreSQL SERVER – PowerShell Version Info
I have multiple computer systems at home. I have previously taken a picture of my home office and published it here. Also, I recently had a scenario where I was listing a PowerShell version installed in my computer systems. While searching online, I found two different commands that can determine…
Read MoreSQL SERVER – Index Levels, Page Count, Record Count and DMV – sys.dm_db_index_physical_stats
In the recent Query Tuning project, one of the developers who were helping me out in the project asked me if there is any way that he could know how many pages are used by any Index, and if there is any way I could demonstrate the different levels of…
Read MoreSQL SERVER – View XML Query Plans in SSMS as Graphical Execution Plan
Earlier I wrote a blog post on SQL SERVER – Parallelism – Row per Processor – Row per Thread, where I mentioned the XML Plan. As a follow up on the blog post, I received the request to send the same execution plan so that the blog readers can also…
Read More