Hi every One I am trying to add column in Mysql.
My Sql Query is Given Below
CREATE TABLE `mtrans`.`order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_date` date NOT NULL,
`order_by` varchar(50) NOT NULL,
`amount` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
But when i add one more column it will give some error like that.
My error log is given below
Error executing SQL commands to update table.
MySQL Error Nr. 1064
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 'AFTER `amount`' at line 1
You need to use alter table in mysql.
I’m assuming you’ve already created
order tablesuccessfully.Simple alter table to add column in existing table.
query to add column after a existing column.