I have a table that describes how this:
mysql> describe easy_table; +---------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------------+--------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | version | bigint(20) | NO | | NULL | | | account_id | bigint(20) | NO | MUL | NULL | | | city | varchar(30) | NO | | NULL | | ... | name | varchar(255) | YES | | NULL | | | name_two | varchar(255) | YES | | NULL | | +---------------------+--------------+------+-----+---------+----------------+ 13 rows in set (0.03 sec)
I am trying to make varchar city bigger than varchar (100) and this line is not working
alter table easy_table alter column city varchar(100);
it doesn't work either
alter table easy_table alter column city varchar(100) not null;
I get this error:
ERROR 1064 (42000): You have an error in the SQL syntax; check the manual that matches your version of MySQL server to find the correct syntax to use next to 'varchar (100)' on line 1
source share