2020-04-03 13:23:32 +00:00
|
|
|
|
---
|
2022-08-28 14:53:34 +00:00
|
|
|
|
slug: /en/sql-reference/table-functions/
|
2022-04-09 13:29:05 +00:00
|
|
|
|
sidebar_label: Table Functions
|
2023-06-23 13:16:22 +00:00
|
|
|
|
sidebar_position: 1
|
2020-04-03 13:23:32 +00:00
|
|
|
|
---
|
|
|
|
|
|
2023-06-23 13:16:22 +00:00
|
|
|
|
# Table Functions
|
2020-04-03 13:23:32 +00:00
|
|
|
|
|
|
|
|
|
Table functions are methods for constructing tables.
|
|
|
|
|
|
|
|
|
|
You can use table functions in:
|
|
|
|
|
|
2023-04-19 16:10:51 +00:00
|
|
|
|
- [FROM](../../sql-reference/statements/select/from.md) clause of the `SELECT` query.
|
2020-04-03 13:23:32 +00:00
|
|
|
|
|
2022-08-11 00:09:43 +00:00
|
|
|
|
The method for creating a temporary table that is available only in the current query. The table is deleted when the query finishes.
|
2020-04-03 13:23:32 +00:00
|
|
|
|
|
2023-04-19 15:55:29 +00:00
|
|
|
|
- [CREATE TABLE AS table_function()](../../sql-reference/statements/create/table.md) query.
|
2020-04-03 13:23:32 +00:00
|
|
|
|
|
2022-08-11 00:09:43 +00:00
|
|
|
|
It's one of the methods of creating a table.
|
2020-04-03 13:23:32 +00:00
|
|
|
|
|
2023-04-19 15:55:29 +00:00
|
|
|
|
- [INSERT INTO TABLE FUNCTION](../../sql-reference/statements/insert-into.md#inserting-into-table-function) query.
|
2021-11-22 19:17:00 +00:00
|
|
|
|
|
2023-03-27 18:54:05 +00:00
|
|
|
|
:::note
|
2022-04-09 13:29:05 +00:00
|
|
|
|
You can’t use table functions if the [allow_ddl](../../operations/settings/permissions-for-queries.md#settings_allow_ddl) setting is disabled.
|
|
|
|
|
:::
|