SQL

SQL is the standard language for working with relational databases. Learn how to query, filter, join, and manage structured data efficiently.

19 lessons · 0 examples

SQL Tutorial(19)

SQL HOME
SQL is the standard language for storing, retrieving, and manipulating data in relational databases. Start here to learn the core SQL concepts and the roadmap of this tutorial.
SQL Intro
SQL (Structured Query Language) is the standard language for working with relational databases. Learn what SQL is, what it can do, and how it fits into real web applications.
SQL Syntax
Learn the basic structure of SQL statements, how tables are organized, and how SQL commands are written and terminated.
SQL Select
The SELECT statement is used to retrieve data from one or more tables. Learn how to select columns, use expressions and aliases, and write readable queries.
SQL Select Distinct
Use SELECT DISTINCT to return unique values from a column or combination of columns. Avoid duplicate results in your queries.
SQL Where
The WHERE clause filters records based on conditions. Learn comparison operators, text filters, numeric filters, and safe handling of NULL values.
SQL Order By
The ORDER BY clause sorts query results in ascending or descending order. Learn how to sort by one or multiple columns.
SQL And
The AND operator combines multiple conditions in a WHERE clause. A row must satisfy all conditions to be returned.
SQL Or
The OR operator returns records when at least one condition is true. Learn how to combine filters safely using parentheses.
SQL Not
The NOT operator excludes records that match a condition. Learn NOT with WHERE, and common patterns like NOT IN, NOT BETWEEN, and NOT LIKE.
SQL Insert Into
The INSERT INTO statement adds new records to a table. Learn how to insert single or multiple rows and handle default values.
SQL Null Values
NULL represents missing or unknown data. Learn how to test for NULL correctly using IS NULL and IS NOT NULL.
SQL Update
The UPDATE statement modifies existing records in a table. Always use WHERE to avoid updating all rows unintentionally.
SQL Delete
The DELETE statement removes records from a table. Always use WHERE carefully to avoid deleting all rows.
SQL Select Top
Limit the number of rows returned by a query using TOP (SQL Server) or LIMIT (MySQL/MariaDB).
SQL Aggregate Functions
Aggregate functions perform calculations on multiple rows and return a single result. Learn COUNT, SUM, AVG, MIN, and MAX.
SQL Min and Max
MIN() and MAX() return the smallest and largest values in a column. They are commonly used in reporting and analytics.
SQL Count
COUNT() returns the number of rows or values in a result set. Learn COUNT(*), COUNT(column), and COUNT(DISTINCT) with real examples.
SQL Sum
SUM() returns the total of a numeric column. Learn how to calculate totals, filter rows, and group results.