【发布时间】:2012-03-19 17:43:24
【问题描述】:
我现在正在使用 PHPMyAdmin,我正在使用以下这些值创建一个新表,但它不起作用,我根本不明白为什么。
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 行
【问题讨论】:
标签: mysql phpmyadmin create-table