Reputation: 3
it leads to error in mysql
create table book_copies
(
bookid references book(bookid) on delete set null,
programme_id references library_branch(programme_id) on delete set null,
no_of_copies int
);
enter image description here a
Upvotes: 0
Views: 60
Reputation: 164629
You are lacking types for your columns. Each column needs a type such as int
or varchar(255)
.
If your columns are referencing primary keys, their type is probably int
or bigint
.
create table book_copies (
bookid int references book(bookid) on delete set null,
programme_id int references library_branch(programme_id) on delete set null,
no_of_copies int
)
Upvotes: 1