POSTGRESQL Foreign Key Referencing Primary Keys of two Different Tables
There’s more than one way to do this in PostgreSQL. Personally, I prefer this way. — This table should contain all the columns common to both — audio books and printed books. create table books ( isbn char(13) primary key, title varchar(100) not null, book_type char(1) not null default ‘p’ check(book_type in (‘a’, ‘p’)), — … Read more