Note: I looked in this forum and could not find the solution I’m looking for.
These are the tables I created:
library:
name, registry
book:
date, author, code
Question 1: Is it possible to select the attributes of the two tables even though they have different attribute amounts?
Question 2: Can I access (select) the attributes of the book
table through the library
table?
Advertisement
Answer
Q1: Yes, as long as they have a common relation (primary key, foreign key). If they have a relation you can always query to get items even if they have different number.
Q2: Yup! You can select books through the use of the library table. You can use something similar to:
SELECT book.author FROM library INNER JOIN book ON library.registry=book.code;