Category: Server Operators
-
SQL Server EXISTS Conditions
In SQL Server, EXIST condition is used in combination with a subquery. It returns at least one row after met the conditions. It can be used in a SELECT, INSERT, UPDATE, or DELETE statement. Syntax: Parameter explanation subquery: The subquery is a SELECT statement. If the subquery returns at least one record in its result set,…
-
SQL Server LIKE Condition (Operator)
SQL Server LIKE condition or operator is used to perform pattern matching. It is used with WHERE clause and SELECT, INSERT, UPDATE and DELETE statement. Syntax: Parameter Explanation expression: It is a character expression like a column or field. pattern: It is a character expression that contains pattern matching. Following is a list of patterns used with…
-
SQL Server IS NOT NULL Condition (Operator)
SQL Server IS NOT NULL condition is used to test for a NOT NULL value. Syntax: Parameter explanation expression: It specifies the value to test where it is NOT NULL value. Note: If the expression is NOT a NULL value, the condition evaluates to TRUE. If it is a NULL value, the condition evaluates to FALSE.…
-
SQL Server IS NULL Condition (Operator)
The SQL Server IS NULL operator is used to test for a NULL value. Syntax: Parameter explanation expression: It specifies a value whether it is NULL. Note:If the expression is NULL value then the condition evaluates to TRUE.If expression is not a NULL value, the condition evaluates to FALSE. IS NULL Operator with SELECT Statement Example:…
-
SQL Server BETWEEN Condition (Operator)
The SQL Server BETWEEN operator is used to retrieve values within a specified range in a SELECT, INSERT, UPDATE, or DELETE statement. Syntax: Parameter Explanation expression: It specifies a column or a calculation. value1 and value2: These values specify inclusive range that is used by expression for comparison. BETWEEN operator with Numeric Value Retrieve all employees from…
-
SQL Server NOT Condition (Operator)
The SQL Server NOT condition or NOT operator is used to negate a condition in a SELECT, INSERT, UPDATE, or DELETE statement. Syntax: Parameter explanation condition: It specifies the condition that you want to negate. NOT Operator with IN condition We have a table “Employees”, having the following data: Example Retrieve all employees from the table…
-
SQL Server UNION Operator
In SQL Server, the UNION operator is used to combine the result-set of two or more SELECT statements. Syntax: Parameter explanation expression1, expression2, … expression_n: expressions specify the columns or calculations that you want to compare between the two SELECT statements. tables: It specifies the tables that you want to retrieve records from. There must be at…
-
SQL Server Comparison Operator
In SQL Server, the comparison operators are used to test for equality and inequality. These operators are used in the WHERE clause to determine which records to select. Following is a list of the SQL Server comparison operators: Index Comparison Operator Description 1) = It specifies equal symbol. 2) <> It specifies not equal symbol.…