# Tables and SQL

> The table editor, the SQL editor, the schema view and the policies editor.

Applies to: Sypnia Cloud (paid service).  
Source: https://data.docs.sypnia.com/console/tables-and-sql/

For agents: Console data tools: table editor (virtualised grid, inline edit, insert, delete, filter, sort, paginate; create/alter tables and columns, foreign keys, RLS toggle on by default), SQL editor (CodeMirror with schema autocomplete, run all or selection, multiple results, saved snippets personal/shared, history, read-only toggle), schema view (tables and relations with a small diagram), policies (list per table, templates owner-only/read-all/team, edit SQL).

## The table editor

- A grid that stays fast with millions of rows: it loads what you see, pages the rest.
- Edit a cell in place, add a row, delete rows, filter and sort by any column; each change is a Data API call you can copy as `curl` or as code.
- Create a table or change one: columns with their types, defaults and nullability, primary key, foreign keys to other tables (or to `sypnia_auth.users`), indexes.
- **Row-level security is on** for every table you create here. The editor warns about any exposed table without it.

## The SQL editor

- Autocomplete from your schema: tables, columns, functions.
- Run everything, or only the selected text; several statements give several result tabs.
- Results in a grid you can sort, copy or download.
- **Saved snippets**, yours or shared with the project, and the **history** of what you ran.
- A **read-only** switch for when you only want to look.

## Schema and policies

- **Schema**: every table and view with its columns and relations, and a small diagram of the relations.
- **Policies**: per table, the row-level security policies, in plain words and in SQL. Start from a template — _only the owner_, _everyone can read_, _members of a team_ — and edit it.
