Be aware when you use two digit year in date

When you execute the below query, as you expect, the result will be “September 26th 2049” Now, Lets see what happen when we pass 50 instead of 49 You will…

Read more »

How to find whether the date is end date of the month in SQL

Working with date is very interesting, I have seen people add too much code to get desired result while it can be achievable with simple logic. Below sample is to…

Read more »

How to find the Date is first day of the Week in SQL

Some time you may need to find the given date is first day of the week or not? here is the code.

Read more »

Concatenate column values from multiple rows into a single column in SQL Server

I have created a simple table to demonstrate how to concatenate the values from multiple rows in to one column. Insert some sample records in to this temporary table Once…

Read more »

JOIN in SQL – Inner Join and Outer Join

JOIN is one of the fundamental units of relational database system. Generally JOIN is used to combine related data from many tables to produce result. There are different types of…

Read more »

SELECT * Vs. SELECT COLUMNS – SQL Server Optimization Techniques

Don’t use * in SELECT query, instead use only required column This is one of the tips to optimize SELECT query. However, does this really give better performance in SQL…

Read more »

How to check if the input is numeric

ISNUMERIC() – This is a system function which can be used to evaluate the given input, if the input is valid numeric it returns 1 otherwise 0. There are times where…

Read more »