SQL SELECT statement
A query statement in SQL (Structured Query Language) that provides instructions about the data to retrieve from a database. For example, the following SQL query accesses a database’s customers table and retrieves the customer name and credit rank values where the credit rank is less than or equal to B. The SQL query then sorts the values by credit rank and customer name.
SELECT customers.creditrank, customers.customName
FROM customers
WHERE customers.creditrank <= 'B'
ORDER BY customers.creditrank, customers.customName
Related terms
Contrast with