Adding New Column is Not Working

polonggo's profile image polonggo posted 9 years ago in General Permalink
I am trying to add a new column in my MySQL database, but an error appears:

/* SQL Error (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 'NULL DEFAULT '0' AFTER `id`' at line 2 */


Here is alter code with table and field name changed:

ALTER TABLE `TableName`
ADD COLUMN `ColumnName`  NULL DEFAULT '0' AFTER `id`;


MySQL Version: 5.5.34
HeidiSQL Version: 9.1.0.4873


Thank you.
[expired user #5144]'s profile image [expired user #5144] posted 9 years ago Permalink
I have the same problem too. I figured out, the is no datatype.
When I choose one from the list, it disappear. I hope this will help to solve the problem.
Code modification/commit from ansgar.becker, 9 years ago, revision 9.1.0.4874
Fix non working addition of new columns in MySQL. See http://www.heidisql.com/forum.php?t=16948
PostgreSQL: Detect all array style types as unknown type, e.g. TEXT[].
ansgar's profile image ansgar posted 9 years ago Permalink
Should be fixed in r4874

Please login to leave a reply, or register at first.