How to increase the size of varchar in Mysql?

Asked

Viewed 5,250 times

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 it in response:

You have an error in your SQL syntax

Would anyone know what the syntax error is? I’ve tried without the not null, with single quotes in 60, with and without a semicolon at the end, I’m running out of ideas.

1 answer

3


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

Remembering that the table name and the field name is without quotation marks ("").

Browser other questions tagged

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