我必须创建一个表如下
借款人(customerNo,LoanNo)
如果客户没有超过3笔贷款,则可以贷款。
我创建了如下表
create table borrower(
customerno int(5),
LoanNo int(5),
primary key(customerno,loanno),
check( customerno not in
(select customerno from borrower group by customerno having count(loanno)>=4))
);
但它给了我一个错误说
[root@localhost:3306] ERROR 1146: Table 'test.borrower' doesn't exist
有人能告诉我如何解决这个错误吗?