SELECT *
A select list that asks for every column of the table, in the table's own order.
In more detail
It is the fastest way to meet a table at a shell. In application code it is a bad habit: the answer changes shape when someone adds a column, and it fetches large text and blob values nobody asked for. Name the columns instead.
Example
SELECT * FROM customers;Related terms
- SELECT — The SQL statement that reads data: it names the columns you want in the answer and, with FROM, the tables they come from.
- projection — Choosing which fields or columns a query returns, or reshaping each result into a different form.
- COUNT — An aggregate that counts rows with COUNT(*), or non-NULL values with COUNT(column).
Taught in
- The SELECT Statement And Projection — PostgreSQL, Indexing & Relational Data Modeling
- Common Table Expressions — PostgreSQL, Indexing & Relational Data Modeling