How To Generate Random Numbers In SQL Server?
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.
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.
Let us see the major differences between IIF vs CASE. IIF is a logical function and CASE is a language expression.
Vehicle control system using the Hybrid VANET is a very reliable and efficient solution than any of the existing methods to prevent road accidents.
Simple step by step illustration for collecting poor performing queries or batches and store them for further analysis in SQL Server using Extended Events.
How to collect poor performing queries or batches and store them in a database table for further analysis in SQL Server using MSSQL Profiler?
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.
VARCHAR(MAX) vs VARCHAR(N). Comparing the differences, advantages and disadvantages between VARCHAR(MAX) and VARCHAR(N).
How to extract only the numbers from string value In SQL Server? Here is a function which extract the sets of numbers from alpha numeric strings.
Which Is Better SET or SELECT? In this article you will see the major differences of SELECT vs SET and the comparison between them in table from.
How to trace errors and exceptions using profiler in SQL Server? Using SQL Server profiler is the easiest way to capture the errors and exceptions occurring in the SQL Server database.