titlesidebar_labeldescription
ALTER TABLE RENAME COLUMN
RENAME COLUMN
RENAME COLUMN SQL keyword reference documentation.

Rename a column in an existing table.

:::caution

  • New column names may only consist of letters, numbers and underscores _

:::

Syntax

Flow chart showing the syntax of the ALTER TABLE keyword Flow chart showing the syntax of the ALTER TABLE RENAME COLUMN keywords

Example

The following example renames an existing column called sensor to hum_sensor_1 from the table measurements:

  1. ALTER TABLE measurements RENAME COLUMN sensor TO hum_sensor_1;