aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/docs/en/syntax/select/from.md
blob: 67d5ef887af66767d1d01dfd3ec2ef6b0ce6590f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
## FROM {#from}

Data source for `SELECT`. The argument can accept the table name, the result of another `SELECT`, or a [named expression](../expressions.md#named-nodes). Between `SELECT` and `FROM`, list the comma-separated column names from the source (or `*` to select all columns).

The table is searched by name in the database specified by the operator [USE](../use.md).

#### Examples

```yql
SELECT key FROM my_table;
```

```yql
SELECT * FROM
  (SELECT value FROM my_table);
```

```yql
$table_name = "my_table";
SELECT * FROM $table_name;
```