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

# tables update

> Enable or disable querying for a table.

Enable or disable querying for a table. A table must be enabled for querying before it can be used with [`clay tables query`](/cli/reference/tables-query). Check how many tables you can enable with [`clay tables query-usage`](/cli/reference/tables-query-usage).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay tables update <tableId> --query-enabled <true|false>
```

## Arguments

| Argument  | Description                            |
| --------- | -------------------------------------- |
| `tableId` | Table id, e.g. `tbl_abc123`. Required. |

## Flags

| Flag                            | Description                                                  |
| ------------------------------- | ------------------------------------------------------------ |
| `--query-enabled <true\|false>` | Enable (`true`) or disable (`false`) querying for the table. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "tbl_abc123",
  "queryEnabled": true
}
```

| Field          | Type    | Description                                    |
| -------------- | ------- | ---------------------------------------------- |
| `id`           | string  | Table id.                                      |
| `queryEnabled` | boolean | Whether querying is now enabled for the table. |

## Errors

| Code               | Exit | Notes                                                                   |
| ------------------ | ---- | ----------------------------------------------------------------------- |
| `validation_error` | 2    | Missing or invalid `--query-enabled`, or missing table id.              |
| `auth_forbidden`   | 3    | The API key lacks the `cli:all` scope, or you lack access to the table. |
| `not_found`        | 6    | No table with that id.                                                  |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay tables update tbl_abc123 --query-enabled true
clay tables update tbl_abc123 --query-enabled false | jq '.queryEnabled'
```
