Skip to content

Commit

Permalink
Add note that fields are defined inside DEFINE FIELD, not DEFINE TABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhghomon committed Dec 18, 2024
1 parent 330bbaa commit 73c96b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/content/doc-surrealql/statements/define/table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import Since from '@components/shared/Since.astro'

# `DEFINE TABLE` statement

The `DEFINE TABLE` statement allows you to declare your table by name, enabling you to apply strict controls to a table's schema by making it `SCHEMAFULL`, create a foreign table view, and set permissions specifying what operations can be performed on the field.
The `DEFINE TABLE` statement allows you to declare your table by name, enabling you to apply strict controls to a table's schema by making it `SCHEMAFULL`, create a foreign table view, and set permissions specifying what operations can be performed on the table.

> [!NOTE]
> The fields of a table are not defined using `DEFINE FIELD`, but via individual [`DEFINE FIELD`](/docs/surrealql/statements/define/field) statements.
## Requirements

Expand Down Expand Up @@ -38,6 +41,7 @@ DEFINE TABLE [ OVERWRITE | IF NOT EXISTS ] @name
```

## Example usage

Below shows how you can create a table using the `DEFINE TABLE` statement.

```surql
Expand Down

0 comments on commit 73c96b9

Please sign in to comment.