SQL Tutorials

Basics, Structured, Programming, Language, Syntax, Database, Clauses, database concepts, SQL Syntax, SELECT, INSERT, DELETE, UPDATE, DROP, TRUNCATE, DISTINCT, ORDER BY, GROUP BY, WHERE, and more are covered in this SQL tutorial for beginners and professionals. A database is a collection of data that has been organized. DBMS: DBMS refers to the Database Management System. It […]

SQL Functions

SQL provides no. of inbuilt functions which perform calculations on groups of rows and return one value for the whole group. Commonly used SQL functions: 1. SQL AVG(): It is used to get the average value of a numeric column.Syntax: 2. SQL COUNT(): It is used to get the number of rows that matches specified […]

Cartesian or Cross Join in SQL

The CARTESIAN JOIN or CROSS JOIN returns the data by joining every row of one table to every row of another table i.e it returns the Cartesian product of two tables. Syntax: Example: Output:

Self Join in SQL

The SELF JOIN is used to join the table to itself that why it is known as SELF JOIN. Syntax: Example: Output:

Full Outer Join in SQL

The FULL OUTER JOIN returns the result of the combination of left and right outer joins. Syntax: Example: Output:

Right Outer Join in SQL

The RIGHT OUTER JOIN returns all records of the right table and matching records of the left table. When no match is found left table columns will be returned with the null values. Syntax: or  Example: Output:

Left Outer Join in SQL

The LEFT OUTER JOIN returns all records of the left table and matching records of the right table. When no match is found right table columns will be returned with the null values. Syntax: or Example: Output:

Inner Join in SQL

The INNER JOIN returns all records from both tables for which the join condition is true. It is also known as EQUIJOIN. Syntax: or Example: Output: