-2
我現在正在使用PHPMyAdmin,並且正在用下面的這些值創建一個新表,但它不工作,我看不出爲什麼。爲什麼MySQL語句不工作?
SQL查詢:
CREATE TABLE `database`.`hub_attendance_lessons` (
`id` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`lesson_id` BIGINT(10) UNSIGNED NOT NULL ,
`course_id` BIGINT(10) UNSIGNED NOT NULL ,
`student_id` BIGINT(10) UNSIGNED NOT NULL ,
`date` BIGINT(10) UNSIGNED NOT NULL ,
`attended` BOOL(2) UNSIGNED NULL ,
`absent` BOOL(2) UNSIGNED NULL ,
`excused_absent` BOOL(2) UNSIGNED NULL ,
`late` BOOL(2) UNSIGNED NULL ,
`excused_late` BOOL(2) UNSIGNED NULL
)
ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
COMMENT = 'stores the attendance of all lessons for all students';
MySQL表示:
#1064 - 你在你的SQL語法錯誤;檢查對應於您 MySQL服務器版本正確的語法使用附近的手冊 '(2)UNSIGNED NULL,
absent
BOOL(2)UNSIGNED NULL,`excused_absent` BOOL(2)UNSI' 在行1
它自動做到這一點。我所有的布爾長度字段都是空的 – 2012-03-19 17:46:48