I recently gone through something and found a unique way of aliasing. I thought it must be share so other techies also aware of it (or might be you already aware of it). See below example SELECT *FROM (VALUES (‘Rajat’,30), (‘Sandeep’,40), (‘Sunil’,35), (‘Shreya’,50), (‘Virendra’,45)) AS T(Name,Runs) Now when you it you will get following result …
Whenever we develop application of maintain application we define sets of rules or policies like naming convention , data type, database & SQL SERVER properties (like which property should be unable or disable) but the problem is to cross check or to enforce these properties is very tedious. To enforce the policies SQL SERVER …
When, I first saw this statement a Hindi proverb come to my mind which is “1 teer 2 nishane” . The meaning of this proverb means a single bow which hit two different aim in one shot. So let me explain “Merge” statement in more detail. With the help of this Merge statement we can …
Recently, When we were delivering session on “SQL SERVER” one of the persons asked why we require Aliasing so I thought this might be question in everyone’s mind. So lets start with couple of well know statements then we will see the actual problem where we need it explicitly. There are two type of aliasing …
We always take NULL very lightly. Like if we are designing database then whether it is necessary or not we allow the data field to accept null.We think it will not affect anything. Actually , at some point this is not always true. According to Microsoft NULL is an Unknown value. It is not …
Dear All, “Microsoft Most Valuable Professional “ – MVP is one of the prestigious tag. It is one of the dreams which came true today. Today , I got the E-mail that I am an MVP in SQL SERVER. I am speechless but would like to say a big thanks to everyone who provided …
I don’t know why every interviewer’s favorite question “Can we insert record using View ?” If you say Yes/No the interviewer will roaming around like so Can you update record using View? or Can you delete record using view ? I hope everyone who is reading this article will be aware of what is …
Let’s consider a scenario where the end user require a CSV file of all the records in a table then BCP is one of the simplest way. BCP stands for Bulk copy program. By the name you got the feeling of lots of data . Although, there are various options & parameters available with …
It’s almost one month that I didn’t write anything on the blog due to some personal reason. I am really sorry for that. Now , Lets talk about the scenario sometimes we need to generate a report of total sales in particular date range but the condition is you need to show all the …