Category Archives: MS SQL Server

Difference between ISNULL and COALESCE in SQL

In this article, we will see the difference between ISNULL and COALESCE in SQL Server. Both ISNULL and COALESCE evaluates the expression for NULL and returns a non-null value. ISNULL The ISNULL function replaces NULL with a specified value. ISNULL ( check_expression, replacement_value ) It contains two parameters. The first parameter is to evaluate the… Read More »

ALTER TABLE usages in MS SQL Server

In SQL server, ALTER TABLE statement is used for the following purposes  ADD columns/ constraints in the existing table.  DROP columns/ constraints in the existing table.  ALTER columns in the existing table.  ENABLE/ DISABLE triggers. ADD columns/constraints Syntax to add columns and constraints while creating column Syntax to add column(s) One or more columns can… Read More »