Glossary
SQL (structured query language)
The standard declarative language for defining, querying, and manipulating data in a relational database.
Also called: structured query language
SQL (structured query language) is the standard language for interacting with relational databases: retrieving data (SELECT), inserting or modifying it (INSERT, UPDATE, DELETE), and defining structures like tables (CREATE TABLE). It is declarative — a query states what result is wanted, such as the total revenue by region, without specifying the step-by-step procedure to compute it, leaving that to the database's query engine.
SQL is standardized by ANSI and ISO, but nearly every database adds its own extensions and variations, so a query written for one warehouse or database often needs adjustment to run on another; common table expressions and window functions are widely, though not universally, supported additions on top of core SQL. Because it is declarative, the same SQL query can be executed very differently depending on the engine's optimizer — see query optimization — without the query text itself changing.
SQL remains the primary interface for analytics work, from ad hoc exploration to the transformation logic written in tools like dbt, and most BI tools generate SQL behind the scenes even when users interact with a visual interface. A common misconception is treating SQL results as guaranteed to come back in a particular row order; without an explicit ORDER BY, a database is free to return rows in any order, and relying on incidental ordering is a frequent source of subtle bugs.
Last reviewed September 22, 2026