How to increase the size of varchar in MySQL?

0

I have a table and access via MySQL, I am using this command to increase the varchar from 50 to 60:

alter table tabela alter column nome varchar(60) not null

But I only get the answer:

  

You have an error in your SQL syntax

Would anyone know what the syntax error was? I have tried without not null , with single quotation marks in 60 , with and without a semicolon at the end, I'm running out of ideas.

    
asked by anonymous 13.07.2018 / 21:14

1 answer

1
ALTER TABLE "nome_tabela" MODIFY "NOME_CAMPO" varchar(60);

Remembering that the table name and the field name is unquoted ( "" ).

    
13.07.2018 / 21:18