I am trying to add a simple column in my table in MySQL but it is giving syntax error:
Error Code: 1064
You have an error in your SQL syntax;
Code:
ALTER TABLE `user`
ADD classname VARCHAR 150 NULL AFTER id;
I am trying to add a simple column in my table in MySQL but it is giving syntax error:
Error Code: 1064
You have an error in your SQL syntax;
Code:
ALTER TABLE `user`
ADD classname VARCHAR 150 NULL AFTER id;
The length of the varchar type must be enclosed by brackets:
ALTER TABLE `user`
ADD classname VARCHAR(150) NULL AFTER id;
the length of a field n sql must be enclosed with (),but you have missed the paranthesis(),so you were getting the error,just try with ()
ALTER TABLE `user`
ADD classname VARCHAR(150) NULL AFTER id;
extra parenthesis is required for datatype
ALTER TABLE `user`
ADD classname VARCHAR(150) NULL AFTER id;