SQL INSERT Statement

In this tutorial, you will learn how to use the SQL INSERT Statement to insert records in a table with the help of examples. The SQL INSERT statement is used to insert one or more records into a SQL table. … Read more »

SQL Order By Multiple Columns

In this tutorial, you will learn how to sort the result set on multiple columns using the SQL ORDER BY clause.  Sometimes we may need to sort the result set on more than one column.  Syntax The syntax for sorting … Read more »

SQL ORDER BY RANDOM

In this tutorial, you will learn how to sort the result set using the SQL ORDER BY clause and select random rows from the result set using database specific RANDOM function. One question that can come to your mind that … Read more »

SQL ORDER BY Descending

The SQL ORDER BY DESC is used to sort records in the result set in descending order. In order to sort the data in descending order, you should use the DESC modifier after the ORDER BY clause. Syntax SELECT expressions … Read more »

SQL ORDER BY Ascending

The SQL ORDER BY ASC is used to sort records in the result set in ascending order. This is the default behavior of most of the databases. That means if you miss the ASC keyword after the ORDER BY clause, … Read more »

SQL ORDER BY Clause

The SQL ORDER BY clause used to sort records in the result set in either ascending or descending order based on one or more columns. Most of the databases sort the result set in ascending order by default. SQL ORDER … Read more »

SQL WITH Clause

The SQL WITH Clause is used to create subquery block which can be referred in the main SQL statement many times. This clause has been introduced by the ORACLE from there 9i release2 version. SQL WITH Clause Syntax The syntax … Read more »

SQL AND and OR clauses

SQL AND & OR clauses are used to combine multiple conditions to filter out the records in an SQL statement. These two operators are called as the conjunctive operators.  These operators can be combined to test multiple conditions in SELECT, … Read more »

SQL WHERE Clause

The SQL WHERE clause is used to filter records during selecting records from one or more tables in SQL. If the condition specified in the WHERE clause matches then only the SQL query returns the specific value. You can use … Read more »

SQL SELECT NULL

What is NULL in SQL? NULL denotes missing or unknown. SQL NULL refers missing or unknown value in a column of a table. Note that zero (‘0’) and NULL are not same, they are completely different. Regarding NULL there could … Read more »