I received following question in email : How to create a comma delimited list using SELECT clause from table column?
SQL SERVER – Example of DISTINCT in Aggregate Functions
Just a day ago, I was was asked this question in one of the teaching session to my team members. One of the member asked me if I can use DISTINCT in Aggregate Function and does it make any difference. Of course! It does make difference. DISTINCT can be used…
Read MoreSQL SERVER – Order Of Column In Index
I just found one of my Jr. DBA to create many indexes with lots of column in it. After talking with him I found out that he really does not understand how really Index works. He was under impression that if he has more columns in one index, that index…
Read MoreSQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 4
I have been asked many times when there is DATENAME function available why do I go in exercise of writing UDF For the getting the day of the week. Answer is : I just like it! SELECT DATENAME(dw, GETDATE()) Reference : Pinal Dave (https://blog.sqlauthority.com)
Read MoreSQL SERVER – Create Default Constraint Over Table Column
Very frequently Jr. Developers request script for creating default constraint over table column. I have written following small script for creating default constraint. I think this will be useful to many other developers who want this script to keep handy.
SQLAuthority News – 3 Million Readers and Continuing Journey
I would like to express my deep gratitude towards your active participation on this blog. There are more than 3 Million of you have visited this site as well contributed to make it successful. You can read my personally selected articles here. SQLAuthority – Best Articles SQLAuthority – Favorite Articles…
Read MoreSQL SERVER – UNPIVOT Table Example
My previous article SQL SERVER – PIVOT Table Example encouraged few of my readers to ask me question about UNPIVOT table. UNPIVOT table is reverse of PIVOT Table. USE AdventureWorks GO CREATE TABLE #Pvt ([CA] INT NOT NULL, [AZ] INT NOT NULL, [TX] INT NOT NULL); INSERT INTO #Pvt ([CA],…
Read More
