views:

69

answers:

2
mysql> ALTER TABLE bdds_arts ADD test VARBINARY;

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 
'' at line 1

something wrong with varbinary type?

here is output of mysql --version

mysql  Ver 14.12 Distrib 5.0.24a, for Win32 (ia32)

UPDATE If I change VARBINARY for BINARY or, say, VARBINARY(25) it works.

Since this is piece of auto-generated script in order to fix this I should know what is going on.

A: 

Remove the comma after bdds_arts.

Pekka
+1  A: 

The BINARY and VARBINARY types are similar to CHAR and VARCHAR.

You have to use a length for it like Varchar(255)

Pentium10