开发者

What's wrong with these columns?

开发者 https://www.devze.com 2023-04-04 04:39 出处:网络
is there something that I\'m missing? Thanks :) Error SQL query: ALTER TABLE `venues` ADD `IF_AIRCONDITIONING` BOOLEAN( 1 ) NOT NULL DEFAULT \'0\'

is there something that I'm missing? Thanks :)

Error

SQL query:

ALTER TABLE `venues` 
ADD `IF_AIRCONDITIONING` BOOLEAN( 1 ) NOT NULL DEFAULT '0'
, ADD `IF_LIVE_MUSIC` BOOLEAN( 1 ) NOT NULL DEFAULT '0'
, ADD `IF_TABLE_FOOTBALL` BOOLEAN( 1 ) NOT NULL DEFAULT '0'

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the m开发者_运维技巧anual that corresponds 
     to your MySQL server version for the right syntax to use near 
     '(1) NOT NULL DEFAULT '0',  ADD `IF_LIVE_MUSIC` BOOLEAN(1) NOT NULL DEFAULT '0', ' at line 1

What's wrong with these columns?


Try getting rid of the quotes around 0 in DEFAULT '0', or use FALSE or false (also without quotes)

Also you shouldn't have to specify a length for boolean fields, try getting rid of ( 1 )

0

精彩评论

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