---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.4
alternate:
  - https://ydb.tech/docs/en/dev/yql-tutorial/alter_table.md
  - https://ydb.tech/docs/ru/dev/yql-tutorial/alter_table.md
sourcePath: en/core/dev/yql-tutorial/alter_table.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Adding and deleting columns

Add a new column to the table and then delete it.

<!-- source: en/dev/yql-tutorial/_includes/yql_tutorial_prerequisites.md -->
{% note info %}

We assume that you already created tables in step [Creating a table](https://ydb.tech/docs/en/dev/yql-tutorial/create_demo_tables.md) and populated them with data in step [Adding data to a table](https://ydb.tech/docs/en/dev/yql-tutorial/fill_tables_with_data.md).

{% endnote %}
<!-- endsource: en/dev/yql-tutorial/_includes/yql_tutorial_prerequisites.md -->

## Adding a column {#add-column}

Add a non-key column to the existing table:

```yql
ALTER TABLE episodes ADD COLUMN viewers Uint64;
```

## Deleting a column {#delete-column}

Delete the column you added from the table:

```yql
ALTER TABLE episodes DROP COLUMN viewers;
```

