Databases & Data Storage

Query

Definition

A query is a request for data or information from a database. The information is retrieved from the database tables and is presented to the user in a structured way.

Why It Matters

Queries are the primary way to interact with and retrieve data from a database. The ability to write effective queries is a fundamental skill for developers and data analysts.

Contextual Example

In SQL, the `SELECT` statement is used to make a query. A query to find all products costing more than $50 would be: `SELECT ProductName FROM Products WHERE Price > 50;`.

Common Misunderstandings

  • A query is a request for data (a read operation).
  • Statements that modify data (like `INSERT`, `UPDATE`, `DELETE`) are generally just called "statements" or "commands", not queries.

Related Terms

Last Updated: December 17, 2025