Below is my Table schema
create table employee( emp_id numeric(4), fname varchar(10), lname varchar(10), mgr_id numeric(4), hire_date date, job_id numeric(2), dept_id numeric(3) );
Now I want to use
ALTER Table command with
Alter Column instead of
Modify from here
Below is my command :-
ALTER TABLE employee ALTER COLUMN dept_id int(8);
But I am getting a error stating syntax-error :-
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int(8)' at line 1
Now if I use
Modify it works then why ALTER COLUMN is not working.The command is correct as per the even the official document.
I am using MySQL 8.0 .