QamoosTech
DatabasesQueryingBeginnerSQL

SQL

PronunciationESS-kyoo-EL

Definition

SQL (Structured Query Language) is the language used to read and change data in relational databases, with commands such as SELECT, INSERT, UPDATE and DELETE.

Where you hear it

In backend interviews, database discussions, and whenever someone says "write a query" for PostgreSQL, MySQL or SQLite.

Examples

  • Run this SQL against the staging database to count the unpaid rows.
  • The ORM generates the SQL for us, but we still read it when debugging.
  • A SQL query selects the unpaid orders and sorts them by due date.

Common mistake

Building SQL by gluing user input into a string. That opens the door to SQL injection; use parameters instead.

Don't confuse with

A database, which stores the data. SQL is the language you use to ask it questions and change it.

Say it at work

  • In a meeting or chatCan you show me the SQL this query produces?
  • In an email or ticketCheck the SQL in the logs before blaming the database.