Is it possible to rename a column in a view?

13,113

You can use the ALTER keyword instead of CREATE but the syntax is the same.

This means ALTER VIEW does the same as CREATE VIEW but drops the existing view first. You must specify the complete new query that defines the view.

Share:
13,113
Drewdavid
Author by

Drewdavid

Updated on June 04, 2022

Comments

  • Drewdavid
    Drewdavid almost 2 years

    I'm not seeing much regarding this after some searching

    Do I need to drop the view and recreate it or is there a way to edit a column name?

    I tried ALTER VIEW tableName oldColumnName newColumnName

    But got a syntax error