Here’s the file:
ALTER TABLE tablename
ADD COLUMN `column_name` varchar(255) NULL;
I’m getting this error on line one:
ERROR 1064 (42000): YOu have an error in your SQL syntax; ... line 1
Why is this?
I’m certain the table name and column name are typed properly as there are other similar sql files that I am basing this one off of.
You’re entering
mysql < MyFile.sqlwithin the MySQL command prompt.You need to run it from your shell. It’s a different way of running
mysqlitself, not a specialmysqlcommand.