ALTER TABLE changing column name

Asked

Viewed 2,089 times

2

When using ALTER TABLE to modify the column name in a table, we need to define the data type again:

ALTER TABLE tabela CHANGE COLUMN nome_antigo novo_nome tipo_dados;

If the data type is not defined, a syntax error. Every time we change the name of a column it is also necessary to declare the type of data or there is another simpler way?

1 answer

6


Browser other questions tagged

You are not signed in. Login or sign up in order to post.