Skip to content
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

Open
Xuanzhihao opened this issue Mar 16, 2020 · 2 comments
Open

数据库问题 #3

Xuanzhihao opened this issue Mar 16, 2020 · 2 comments

Comments

@Xuanzhihao
Copy link

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

这段报错,但我看不懂为什么错了,网上也找不到解决办法。

@Xuanzhihao
Copy link
Author

QQ截图20200316200744
以及还有没执行的地方有这个问题

@14206328213
Copy link

我是单独创建用户的时候报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
mysql> ,idea导入的时候就部署tomcat之后就404源服务器未能找到目标资源的表示或者是不愿公开一个已经存在的资源表示了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants