How To Use If Else Statement In SQL
codehubs

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
codehubs

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
codehubs

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
codehubs

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
codehubs

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
codehubs

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
codehubs

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.

How To Use FULL OUTER JOIN Keyword In SQL
codehubs

In this article, we will learn how to use the FULL OUTER JOIN keyword in SQL. The FULL OUTER JOIN is also known as FULL JOIN.

The FULL OUTER JOIN keyword is used to select all records from both tables.

The columns of the left table will have nulls when no matching rows exist for the row in the right table. Similarly, The columns of the right table will have nulls when no matching rows exist for the row in the left table.

Subscribe

Select Categories