SQL Fundamentals
Chisom Nwokwu · 2025
This chapter explores Structured Query Language (SQL), the language used to communicate with relational databases. It describes SQL fundamentals and looks at simple code examples. The most common and essential SQL commands are the SELECT statement, the AS statement, and the WHERE statement. Comparison operators are used in the WHERE clause to build conditions that filter rows. The LIKE operator in SQL is used to search for a specified pattern in a column, often with text data. The IN statement is used to match a value against a list of values. BETWEEN is used to filter values within a range, and it's inclusive of both ends. Logical operators in SQL are used to combine multiple conditions in a WHERE clause and return rows based on whether those conditions evaluate to TRUE, FALSE, or UNKNOWN. Aggregate functions perform calculations on a set of rows and return a single value.