192k views
3 votes
Which of the following queries contains an equality join?

A. SELECT title, authorid
FROM books, bookauthor
WHERE books.isbn = bookauthor.isbn
AND retail>20;
B. SELECT title, name
FROM books CROSS JOIN publisher;
C. SELECT title, gift
FROM books, promotion
WHERE retail >=minretail
AND retail <=maxretail;
D. None of the above

1 Answer

2 votes

Final answer:

The query with an equality join is A, which joins the books and bookauthor tables on the isbn attribute using an equality operator.

Step-by-step explanation:

The query that contains an equality join is A. SELECT title, authorid FROM books, bookauthor WHERE books.isbn = bookauthor.isbn AND retail>20. An equality join is characterized by the use of an equality operator to match rows from two tables based on a common attribute. In this case, books and bookauthor are being joined on the common attribute isbn. The other queries do not show direct evidence of an equality operator being used to join tables based on a common attribute.

User Joe M
by
7.8k points