In this post we will discuss logical operators use in predicates like OR, AND, NOT.
The operators used in the predicates are Logical operators AND, OR, NOT are used for combining predicates in the where clause.
The AND operator allows SQL statement to filter data based on
In this post we will discuss CASE statement. This statement performs some kind of an action or controls the flow of the code.
The CASE expression has two forms- the simple form and the searched form. CASE returns a value, and hence is an expression.
The simple form
SQL: IS OPERATOR
In this post we will learn IS operator it is use with NULL and NOT NULL operator to check whether a value is null or not.
In database NULL is unknown or missing value, therefor we can not use the <, > ,= operators to check value is
Logical Query Processing Phases
In this post we will discuss logical query processing phases in SQL server. Logical query processing means in which order the sql query clause is evaluated.
The below table represent the order of clause evaluation in SQL:
From (join, pivot, unpivot, apply)
Group by (grouping sets,
In this post we will discuss about ALTER command it is useful when we have created a table and after we have to add or delete something from the table structure.
ALTER command is used to modify the structure of the exiting table.
Using ALTER command, it is possible
SQL: IN OPERATOR
In this post we will discuss IN operator in SQL server 2016 with example.
The arithmetic operator (=) compare a single value to another single value. In case a value needs to be compared to a list of values then the IN predicate is used.
The IN predicate
DATA TYPE CONVERSION
In this post we will discuss about data type conversion in SQL server 2016.
We have to make sure that when we indicate a literal of a type, we use the correct form. For example, literal of regular character string are delimited with single quotation marks, as ‘abc’,
Handling NULL values in SQL
In this post we learn how to handle NULLs in SQL server. for handling NULLs in SQL server we use ISNULL(), NULLIF(), COALESCE() functions with example.
The ISNULL() function is commonly used function that return first value that is not null among their input.
In this post we will discuss BETWEEN operator in SQL server. it is used for pattern searching.
To select data that is within a range of values, the BETWEEN operator is used. The BETWEEN operator allows the selection of rows that contain values within a specified lower and upper limit.
In this post we discuss about set operators with example for better understanding. In SQL there three set operators union, intersect, except.
Before discussing about set operators we have to know some rules for set operators:
Column alias must be expression in the first query.
Each select statement must