CREATE TABLE fee
(
payment_no int NOT NULL AUTO_INCREMENT,
student_name varchar(255),
student_class varchar(255),
register_fee double,
paid_fee double,
balanced double,
monthly_fee double,
transport_fee double,
extra_fee double,
PRIMARY KEY (payment_no),
FOREIGN KEY (student_name, student_class, register_date)
REFERENCES kids(student_name,student_class,register_date)
)
MySQL说:文档
#1046 - 未选择数据库