You can assign a new name for a derived column in the SELECT statement which is also known as an alias name. But you need to understand how column alias are assigned and its scope
SQL SERVER – Identify Time Between Backups Calculation
As part of my script archives, I stumbled upon a script that I had written a long time back and thought this must get to the blog. This script was inspired from a simple question asked by an DBA when I had visited them for a session. The question was…
Read MoreInterview Question of the Week #035 – Different Ways to Identify the Open Transactions
Question: What are different ways to identify open transactions in SQL Server? Answer:Â There are many ways to identify the open transactions. If there are some transactions which were started and not yet committed or rollback, you can use any of these to find them Use DBCC command There is a…
Read MoreSQL SERVER – How to Enable or Disable All the Triggers on a Table and Database?
Here is the quickest way to disable all the triggers for a table. Please note that when it is about the table, you will have to specify the name of the table. However, when we have to enable or disable trigger on the database or server, we just have to…
Read MoreSQL SERVER – Configure the Backup Compression Default Server Configuration Option
When I get a chance to talk to Enterprise customers working with a really smart DBA team, I generally look out for options they use on a daily basis and are often missed in the bigger scheme of things. One such feature of SQL Server Enterprise Edition is the ability…
Read MoreSQL SERVER – What’s the Difference between ROW_NUMBER, RANK, and DENSE_RANK? – Notes from the Field #096
[Note from Pinal]: In this episode of the Notes from the Field series database expert Kathi Kellenberger explains about T-SQL Window Functions. 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…
Read More