Loading lesson path
SQL
SQL Tutorial focused on Introduction to SQL and related concepts.
SQL is a standard language for storing, manipulating and retrieving data in databases.
SQL is a standard language for accessing and manipulating databases.
Most of the actions you need to perform on a database are done with SQL statements.
The SELECT statement is used to select data from a database.
The SELECT DISTINCT statement is used to return only distinct (unique) values.
The WHERE clause is used to filter records.
The ORDER BY keyword is used to sort the result-set in ascending or descending order.
The WHERE clause can contain one or many AND operators.
The WHERE clause can contain one or more OR operators.
The NOT operator is used in the WHERE clause to return all records that DO NOT match the specified criteria. It reverses the result of a condition from true to false and vice-versa.
The INSERT INTO statement is used to insert new records in a table.
If a field in a table is optional, it is possible to insert or update a record without adding any value to this field. This way, the field will be saved with a NULL value.
The UPDATE statement is used to update or modify one or more records in a table.
The DELETE statement is used to delete existing records in a table.
The SELECT TOP clause is used to limit the number of records to return.
An aggregate function is a function that performs a calculation on a set of values, and returns a single value.
The MIN() function returns the smallest value of the selected column.
The MAX() function returns the largest value of the selected column.
The COUNT() function returns the number of rows that matches a specified criterion.
The SUM() function is used to calculate the total sum of values within a numeric column.
The AVG() function returns the average value of a numeric column.
The LIKE operator is used in a WHERE clause to search for a specified pattern within a column's text data.
A wildcard character is used to substitute one or more characters in a string.
The IN operator is used in the WHERE clause to check if a specified column's value matches any value within a provided list.
The BETWEEN operator is used in the WHERE clause to select values within a specified range.
An alias is created with the AS keyword, and is often used to make a column name more readable.
The JOIN clause is used to combine rows from two or more tables, based on a related column between them.
The INNER JOIN returns only rows that have matching values in both tables.
The LEFT JOIN returns all rows from the left table (table1), and only the matched rows from the right table (table2).
The RIGHT JOIN returns all rows from the right table (table2), and only the matched rows from the left table (table1).
The FULL JOIN returns all rows when there is a match in either the left or right table.
A self join is a regular join, but the table is joined with itself.
The UNION operator is used to combine the result-set of two or more SELECT statements.
The UNION ALL operator is used to combine the result-set of two or more SELECT statements.
The GROUP BY statement is used to group rows that have the same values into summary rows, like "Find the number of customers in each country".
The HAVING clause is used to filter the results of a GROUP BY query based on aggregate functions.
The EXISTS operator is used in a WHERE clause to check whether a subquery returns any rows.
The ANY operator is used to compare a value to every value returned by a subquery.
The ALL operator is used to compare a value to every value returned by a subquery.
The SELECT INTO statement is used to create a new table and fill it with data from an existing table.
The INSERT INTO SELECT statement is used to copy data from an existing table and insert it into another existing table.
The CASE expression is used to define different results based on specified conditions in an SQL statement.
Operations involving NULL values can sometimes lead to unexpected results.
A stored procedure is a precompiled SQL code that can be saved and reused.
Comments are used to explain SQL code, or to temporarily prevent execution of SQL code (for debugging).
SQL operators are keywords and symbols used to perform operations with data values.