I’m starting to study MySQL and I found in one of my resources the use of the command:
Alter table tableName modify(....)
Instead of using ‘modify column’
It it valid to use it and if it’s I want some.
I tried to search about it but I found nothing. The only information is that could be an older version
2
Answers
If you look at the
alter table
documentation, you’ll see that when using themodify
directive, thecolumn
keyword is optional:In layman’s terms – you can either use it or not, it makes no difference.
If I understand the question correctly, it looks like you’re wondering if you can skip the keyword
COLUMN
It appears the correct syntax is
MODIFY COLUMN column_name datatype;
see alter/modify