As soon as a new version of SQL Server is announced, I always try to find new things and update my old post with new information or write a new post. In this blog, we would learn about new function introduced in SQL Server 2019 which is a partial replacement of DBCC PAGE.
If you have not heard about the capability of DBCC PAGE then you can look at my earlier blog on the same topic. SQL SERVER – Identifying Page Types
SQL Server – Formatted Date and Alias Name in ORDER BY Clause
CONVERT function can be used to change the format of DATE to various formats like MM/dd/yyy, dd/MM/yyy, yyy/MM/dd, etc. But have you ever noticed that this will produce resultset with a different order if the alias name is used in ORDER BY Clause? Well, I just learned about the formatted date from my recent consulting engagement Comprehensive Database Performance Health Check.
SQL SERVER – Selecting Random n Rows from a Table
Every day I spend a good amount of time with different customers helping them with SQL Server Performance Tuning issues. Today we will discuss the question asked by a developer at the organization where I was engaged in Comprehensive Database Performance Health Check. The developers wanted to know if there is any way he can randomly select n rows from a table.
SQL SERVER – Restoring SQL Server 2017 to SQL Server 2005 Using Generate Scripts
Let me answer the first question first – There is no way to backup and restore SQL Server 2017 to SQL Server 2005 with the help of any tools. In this blog post, we will learn about how we can generate scripts to achieve this task.
SQL SERVER – Simple Method to Find FIRST and LAST Day of Current Date
In my very old post SQL SERVER – Query to Find First and Last Day of Current Month – Date Function, I had explained how to find the first day and last day of the current date.
SQL SERVER – Remove Duplicate Rows Using UNION Operator
In my earlier post on SQL SERVER – Delete Duplicate Rows, I showed you a method of removing duplicate rows with the help of ROW_NUMBER() function and COMMON TABLE EXPRESSION. In this post, I am going to show you a tricky method of removing duplicate rows using traditional UNION operator.