How To Use Case Statement In SQL
SQL

In this article, we will learn how to use the Case statement in SQL.

In SQL, the CASE statement goes through conditions and when the first condition is met it returns a value. So, once a condition is true, it will stop reading and return the result. If no conditions are true, it returns the value in the ELSE clause (like an If Else statement).

It returns NULL if there is no ELSE part and no conditions are true.

How To Use If Else Statement In SQL
SQL

In this article, we will learn how to use the If-Else statement in SQL.

In SQL, the If-Else statement executes a block of code if a specified condition is true. If the condition is false, else block of code can be executed.

The If-Else statement is a part of SQL’s conditional Statements. Conditional Statements are used to perform different actions based on different conditions in SQL.

How To Write Insert Into Select Query In SQL
SQL

In this article, we will learn how to write a SQL insert into select query.

To copy data from one table and insert it into another table in SQL, the INSERT INTO SELECT statement is used.

Data types in source and target table should match.
Existing records in the target table are unaffected.

How To Write Select Into Query In SQL
SQL

In this article, we will learn how to write a SQL select into query.

To copy data from one table into a new table in SQL, the SELECT INTO statement is used.

With the column-names and types as defined in the old table, the new table will be created. You can create new column names using the AS clause (Aliases).

How To Use Exists Operator In SQL
SQL

In this article, we will learn how to use the EXISTS operator in SQL.

The EXISTS operator is used to checking the presence of any record in a subquery.

If the subquery returns one or more records, the EXISTS operator returns true.

How To Use GROUP BY Keyword In SQL
SQL

In this article, we will learn how to use the GROUP BY keyword in SQL.

The GROUP BY statement is used to group rows that have the same values.

The GROUP BY statement is usually used with aggregate functions to group the result-set by one or more columns.

How To Use UNION Operator In SQL
SQL

In this article, we will learn how to use the UNION operator in SQL.

To combine the result-set of multiple SELECT statements, the UNION operator is used.

Within UNION each SELECT statement must have the same number of columns.
The columns must also have similar data types.
The columns must also be in the same order in each SELECT statement.

How To Use CROSS JOIN Keyword In SQL
SQL

In this article, we will learn how to use the CROSS JOIN keyword in SQL.

The CROSS JOIN keyword is used to combine each row of the first table with each row from the second table, also known as CARTESIAN JOIN.

In general words, we can say that the CROSS JOIN keyword is used to select the Cartesian product of the sets of rows from the joined table.

Subscribe

Select Categories