Category Archives: SQL

How to get Start Date and End Date of Current Month in SQL

Here I am sharing a simple technique to get start date and end date of current month in sql.

You can replace getdate() with any date to find the first and last date of that month.

IF ELSE Statements in SQL

As you know IF ELSE statements are used for test conditions.

IF condition is satisfied and the Boolean expression returns TRUE, it will executed IF Block Sql statement.
IF condtion is not satisfied and the Boolean expression returns FALSE, it will executed ELSE Block Sql Statement query.Below is a sample If Else statement

Below is an example for dealing with complex statements using tables