How To Find Leap Year In SQL Server?
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.
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.
Let us see the major differences between IIF vs CASE. IIF is a logical function and CASE is a language expression.
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.
Here is the T-SQL queries to reduce index fragmentation by using either INDEX REORGANIZE or INDEX REBUILD. You will also see when to REORGANIZE and REBUILD.
Here is the T-SQL query to find index fragmentation in SQL Server database. This query will list all the indexes in the database and the the fragmentation level in percent.
Simple and clean method to escape special characters using STRING_ESCAPE system function. STRING_ESCAPE function was introduced in SQL 2016. Here we will see how to use it to escape dome of the special characters.
Here is how to get the day of week In SQL Server. We will see couple of inbuilt functions to get the day of week.
Unable to change SQL Server database compatibility level from management studio. Because the compatibility level field in the database properties window is disabled and grayed out.
How to copy tables from one database to another database In SQL Server? Here is a quick tip to copy a table along with it’s table structure from one SQL Server database to another database on the same server.
How to rollback transaction on error in SQL Server stored procedure? Example for including transaction in TRY – CATCH block to rollback a transaction on any error occurred in the stored procedure.
How will you return error message in SQL Server stored procedure? Capturing the exception occurred in a stored procedure and returning the error message to the calling application is important in SQL Server programming. Here is the method to return the error message from a stored procedure.