Category: Miscellaneous

  • Triggers in SQL Server

    A trigger is a set of SQL statements that reside in system memory with unique names. It is a specialized category of stored procedure that is called automatically when a database server event occurs. Each trigger is always associated with a table. A trigger is called a special procedure because it cannot be called directly like a…

  • Stored Procedure in SQL Server

    A stored procedure is a group of one or more pre-compiled SQL statements into a logical unit. It is stored as an object inside the database server. It is a subroutine or a subprogram in the common computing language that has been created and stored in the database. Each procedure in SQL Server always contains a name, parameter…

  • SQL Server Temp Table

    A temporary (temp) table in SQL Server is a special table that cannot be stored permanently on the database server. This table keeps a subset of data from a regular table and can be reused multiple times in a particular session. We cannot store this table in the memory. Since this table exists temporarily on the…

  • SQL Server ISNULL Function

    It is a built-in function in SQL Server. It allows the user to replace the NULL values with a given replacement value. This article gives a complete overview of the ISNULL function to return an alternative value if the expression or table records have NULL values. Syntax The following is a syntax that illustrates the ISNULL function:…

  • SQL Server IF ELSE

    The IF statement is a part of the control flow function in SQL Server. Usually, it is a decision-making statement in various programming languages that returns a value based on the given conditions. This statement executes the code written in IF block when the given condition evaluates to true and when the condition evaluates false, then…

  • SQL Server Replace

    The name ‘replace’ defines itself that means it replaces something with another value. The replace function in SQL Server is used to replace all occurrences of a string or portion of the string (substring) with a new given string value. This article provides a complete overview of using the REPLACE() function for replacing all occurrences of a string with…

  • Drop Column in SQL Server

    SQL Server allows the user to delete one or more columns from the table whenever they are not used or obsolete. It is required to have ALTER permission on the object before removing the columns from a table. In this article, we are going to discuss a complete overview of how we can delete columns from an…

  • Add Columns in SQL Server

    A table column is a group of cells that contain text or numbers. Each column can store one value for each row in the table. SQL Server allows us to add the column whenever we need them. It must ensure that we have ALTER permission on the object before adding the columns in a table. This article…

  • SQL Server JOINS

    In real life, we store our data in multiple logical tables that are linked together by a common key value in relational databases like SQL Server, Oracle, MySQL, and others. As a result, we constantly need to get data from two or more tables into the desired output based on some conditions. We can quickly achieve this…

  • SQL Server CASE

    The CASE expression is a part of the control flow function that evaluates a list of conditions and gives the output when the first condition is met. It is primarily used to handle conditional statements, same as IF-THEN-ELSE statements in other programming languages. A CASE statement evaluates the condition, and when finds true, it will stop executing…