> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Table permissions

> Learn about the permissions that can be assigned to tables in Firebolt, including controlling access to table data and managing table-level operations.

In Firebolt, a **table** is a structured data object within a database, composed of rows and columns. Tables are the foundational units for organizing, querying, and managing data in your Firebolt data warehouse. Table-level permissions allow roles to perform actions such as selecting, modifying, or managing data within specific tables.

> [!NOTE]
>
> To perform actions on a table, roles must also have **USAGE** permissions on both the parent schema and the parent database of the table.

## Table-level privileges

| Privilege | Description | GRANT Syntax | REVOKE Syntax |
| - | - | - | - |
| SELECT | Allows selecting rows from the table. Can be scoped to specific columns using [column-level security](https://docs.firebolt.io/security/guides/column-level-security.md). | `GRANT SELECT ON TABLE <table_name> TO <role_name>;` | `REVOKE SELECT ON TABLE <table_name> FROM <role_name>;` |
| [INSERT](https://docs.firebolt.io/reference-sql/commands/data-management/insert.md) | Allows inserting rows into the table. Applies to managed tables only. | `GRANT INSERT ON TABLE <table_name> TO <role_name>;` | `REVOKE INSERT ON TABLE <table_name> FROM <role_name>;` |
| MODIFY | Allows modifying and dropping the table. | `GRANT MODIFY ON TABLE <table_name> TO <role_name>;` | `REVOKE MODIFY ON TABLE <table_name> FROM <role_name>;` |
| [DELETE](https://docs.firebolt.io/reference-sql/commands/data-management/delete.md) | Allows deleting rows and dropping partitions from the table. Applies to managed tables only. | `GRANT DELETE ON TABLE “<table_name>” TO <role_name>;` | `REVOKE DELETE ON TABLE “<table_name>” FROM <role_name>;` |
| [UPDATE](https://docs.firebolt.io/reference-sql/commands/data-management/update.md) | Allows updating rows in the table. Applies to managed tables only. | `GRANT UPDATE ON TABLE <table_name> TO <role_name>;` | `REVOKE UPDATE ON TABLE <table_name> FROM <role_name>;` |
| [TRUNCATE](https://docs.firebolt.io/reference-sql/commands/data-management/truncate-table.md) | Allows truncating a table. Applies to managed tables only. | `GRANT TRUNCATE ON TABLE <table_name> TO <role_name>;` | `REVOKE TRUNCATE ON TABLE <table_name> FROM <role_name>;` |
| [VACUUM](https://docs.firebolt.io/reference-sql/commands/data-management/vacuum.md) | Allows running the `VACUUM` operation. Applies to managed tables only. | `GRANT VACUUM ON TABLE <table_name> TO <role_name>;` | `REVOKE VACUUM ON TABLE <table_name> FROM <role_name>;` |
| ALL \[PRIVILEGES] | Grants all privileges over the table to a role. | `GRANT ALL ON TABLE <table_name> TO <role_name>;` | `REVOKE ALL ON TABLE <table_name> FROM <role_name>;` |

> [!NOTE]
>
> To grant permissions across all tables in a schema, use [schema-level privileges](https://docs.firebolt.io/security/rbac/database-permissions/schema-permissions.md). For example, privileges like **SELECT ANY**, **INSERT ANY**, or **DELETE ANY** at the schema level will apply to all current and future tables within that schema.

## Indexes

In Firebolt, indexes can be used to accelerate query performance.
An [aggregating index](https://docs.firebolt.io/performance-and-observability/storage-and-indexing/aggregating-index.md) accelerates queries involving aggregate functions on large tables.
A \[vector search index] allows to quickly find vectors that are similar (i.e., in close distance) to a query vector.

To **create** or **drop** an index, a role must have the following permissions:

* `MODIFY` permission on the table.
* `CREATE` permission on the parent schema.
* `USAGE` permission on the parent schema.
* `USAGE` permission on the parent database.

To drop an index, the role requires:

* `MODIFY` permission on the table.
* `USAGE` permission on the parent schema.
* `USAGE` permission on the parent database.

## Examples of modifying table permissions

The following example use [`GRANT`](https://docs.firebolt.io/reference-sql/commands/access-control/grant) to grant permissions. You can also replace `GRANT` with [REVOKE](https://docs.firebolt.io/reference-sql/commands/access-control/revoke.md) in any of the examples to remove any granted privileges.

### SELECT permission

The following code example [grants](https://docs.firebolt.io/reference-sql/commands/access-control/grant.md) the role `developer_role` permission to read data from the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT SELECT ON TABLE games TO developer_role;
```

You can also grant `SELECT` on specific columns only. The following example restricts the role to reading only the `name` and `score` columns:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT SELECT (name, score) ON TABLE games TO developer_role;
```

For more information, see [Column-level security](https://docs.firebolt.io/security/guides/column-level-security.md).

### INSERT permission

The following code example gives the role `developer_role` permissions to [insert](https://docs.firebolt.io/reference-sql/commands/data-management/insert.md)  rows into the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT INSERT ON TABLE games TO developer_role;
```

### MODIFY permission

The following code example grants the role `developer_role` permission to alter or drop the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT MODIFY ON TABLE games TO developer_role;
```

### DELETE permission

The following code example gives the role `developer_role` permission to [delete](https://docs.firebolt.io/reference-sql/commands/data-management/delete.md) rows or partitions from the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT DELETE ON TABLE games TO developer_role;
```

### UPDATE permission

The following code example grants the role `developer_role` permission to [update](https://docs.firebolt.io/reference-sql/commands/data-management/update.md) rows in the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT UPDATE ON TABLE games TO developer_role;
```

### TRUNCATE permission

The following code example gives the role `developer_role` permission to [truncate](https://docs.firebolt.io/reference-sql/commands/data-management/truncate-table.md) the `games` table, removing all rows:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT TRUNCATE ON TABLE games TO developer_role;
```

### VACUUM permission

The following code example grants the role `developer_role` permission to run the [`VACUUM`](https://docs.firebolt.io/reference-sql/commands/data-management/vacuum) operation on the `games` table:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT VACUUM ON TABLE games TO developer_role;
```

### ALL permissions

The following code example grants the role `developer_role` with all permissions on the table `games`:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
GRANT ALL ON TABLE games TO developer_role;
```

## Considerations

* Use the [REVOKE](https://docs.firebolt.io/reference-sql/commands/access-control/revoke.md) statement to remove any granted privileges. Replace [`GRANT`](https://docs.firebolt.io/reference-sql/commands/access-control/grant) with [`REVOKE`](https://docs.firebolt.io/reference-sql/commands/access-control/revoke) in the examples above.
* Table-level permissions apply only to the specified table. For broader control, consider granting schema-level privileges.
* `SELECT` can be scoped to individual columns using [column-level security](https://docs.firebolt.io/security/guides/column-level-security.md). A role with table-level `SELECT` can read all columns regardless of any column-scoped grants.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.