| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/mrdeveloperdude/sqlmodel/main/docs/tutorial/select.md | [Back] [Original] |
| id | name | secret_name | age |
|---|---|---|---|
| 1 | Deadpond | Dive Wilson | null |
| 2 | Spider-Boy | Pedro Parqueador | null |
| 3 | Rusty-Man | Tommy Sharp | 48 |
| id | name | secret_name | age |
|---|---|---|---|
| 1 | Deadpond | Dive Wilson | null |
| 2 | Spider-Boy | Pedro Parqueador | null |
| 3 | Rusty-Man | Tommy Sharp | 48 |
[image01.png]
!!! warning
Here we are getting all the rows.
If you have thousands of rows, that could be expensive to compute for the database.
You would normally want to filter the rows to receive only the ones you want. But we'll learn about that later in the next chapter.
### A SQL Shortcut
If we want to get all the columns like in this case above, in SQL there's a shortcut, instead of specifying each of the column names we could write a `*`:
```SQL
SELECT *
FROM hero
```
That would end up in the same result. Although we won't use that for **SQLModel**.
### `SELECT` Fewer Columns
We can also `SELECT` fewer columns, for example:
```SQL
SELECT id, name
FROM hero
```
Here we are only selecting the `id` and `name` columns.
And it would result in a table like this:
| id | name |
|---|---|
| 1 | Deadpond |
| 2 | Spider-Boy |
| 3 | Rusty-Man |
| id | name | secret_name | age |
|---|---|---|---|
| 1 | Deadpond | Dive Wilson | null |
| 2 | Spider-Boy | Pedro Parqueador | null |
| 3 | Rusty-Man | Tommy Sharp | 48 |
| Web Proxy Viewer | New URL | Original Page |