Get records from one table which are not present in another table using EXCEPT
Getting records from one table which are not present in another table using EXCEPT operator in SQL Server.
Getting records from one table which are not present in another table using EXCEPT operator in SQL Server.
In SQL Server there are several ways to concatenate columns to a single string. Here are few methods for concatenating columns based on the version of SQL Server.
Formatting SQL statements or source code of procedures or function in SSMS is a daunting task. Here you will see how to use a plugin to format T-SQL in SSMS.
Here is a simple tip on how to drop a temporary or temp table if it exists using the DIY in 2016 or higher versions of SQL Server.
Here is a simple tip to reset identity seed of an auto incremented identity column after deleting records from the table in SQL Server.
Here is a simple tip to convert the datetime value to a specific formatted date like YYYY-MM-DD in SQL Server 2012 and higher.
Here is a simple method to generate a date from integer format of day, month and year in SQL Server.
Here is a simple trick for generating unique random number for each row in select statement in SQL Server. Let’s see how it works.
Generating random numbers is very simple in SQL Server. We can use the built-in function RAND() to generate random number. Here are some examples.
There are several ways to get the the list of column names of a table on a specific SQL Server database. I will go through these methods.
There is a couple of straightforward ways to get day of year for a given date in SQL Server using DATENAME or DATEPART built-in function. Let’s see how to use them
Here is the simple technique to get only the date part of GetDate() in SQL Server.
Here are couple methods to find the number of weeks in a month including the partial weeks considering different start day of week.
We have to use our own logic to find whether the given year is leap or not. Here I have gone through couple of methods to find the the leap year in SQL Server.
Here is the simple straightforward way to find the last day of the month in SQL Server using the built-in date function EOMONTH.
Here is a simple script to find the first day of the month in SQL Server without using varchar conversion. This method returns the result in datetime format.
Here is a simple SQL Server tip on getting the week number of month using DATEPART, DATEADD and EOMONTH functions.
Here is the simple tip to get the week number of the year In SQL Server using an in-built function.
Quick tip for getting the name of month In SQL Server for a specific date or current date.
Is it a good practice to use VARCHAR(MAX) instead of VARCHAR(N)? We will see the answer and the reason for it in this article.