-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
数据库问题 #3
Comments
我是单独创建用户的时候报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 'system IDENTIFIED by '1234'' at line 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
19:49:16 CREATE TABLE orders ( # 订单号 orderNumber CHAR(32) NOT NULL , # 订单状态 orderStatus CHAR(18) check (value in ('预订中','已入住','已退房')) , # 客户身份证 customerIDCard CHAR(18), # 入住房间号 roomNumber CHAR(6) NOT NULL, # 入住时间 checkInTime DATE NOT NULL, # 离店时间 checkOutTime DATE NOT NULL, # 需付金额(由于可能续费,不能作为外键) totalMoney INT UNSIGNED NOT NULL, # 服务员工号 waiterID VARCHAR(10) NOT NULL, # 备注 remarks VARCHAR(32), orderTime DATE NOT NULL, # 主键 PRIMARY KEY (orderNumber), # 外键 FOREIGN KEY (customerIDCard) REFERENCES customers(customerIDCard), FOREIGN KEY (roomNumber) REFERENCES room(roomNumber), FOREIGN KEY (waiterID) REFERENCES waiter(waiterID) ) ENGINE=InnoDB Error Code: 3813. Column check constraint 'orders_chk_1' references other column. 0.000 sec
这段报错,但我看不懂为什么错了,网上也找不到解决办法。
The text was updated successfully, but these errors were encountered: