开发者

Why this is not valid MySQL query?

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开发者_C百科 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.


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

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


Remove the comma after bdds_arts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜