![]() ![]() But I should have met this error when inserting data. > foreign key (dept_name) references department) ĮRROR 1215 (HY000): Cannot add foreign key constraintĪfter searching google for foreign key constraint, I have just learned that the word 'foreign key constraint' indicates that data from foreign key column in the table course must exist in primary key column in the table department. | budget | decimal(12,2) | YES | | NULL | |Ĭreating the table course causes the following error. ![]() | building | varchar(15) | YES | | NULL | | | dept_name | varchar(20) | NO | PRI | | | | Field | Type | Null | Key | Default | Extra | the table department looks like mysql> select * from department But I have a trouble with creating the table course. I'm going to implement the university database system shown in chapter 2 on OS X on MySQL. ![]() I have read Database system concepts, 6th edition, Silberschatz. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |