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

# alter-table

> Modify an existing table by applying SQL operations such as adding or dropping columns.

The `alter-table` command performs multiple alter operations on a table.

```bash theme={null}
nx1 alter-table \
  --catalog <catalog-name> \
  --operations <sql-operation> \
  --schema <schema-name> \
  --table <table-name>
```

<Accordion title="Options">
  * `--catalog` `string` **required**: Catalog name.
  * `--operations` `string` **required**: SQL operations to perform on the table, such as
    `add` or `drop` column.
  * `--schema` `string` **required**: Schema name.
  * `--table` `string` **required**: Table name.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>
