Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C. SELECT title FROM books UNION ALL SELECT gift FROM promotion; d. all of the a

ID: 3702059 • Letter: C

Question

C. SELECT title FROM books UNION ALL SELECT gift FROM promotion; d. all of the above 13. If the CUSTOMERS table contains seven records and the ORDERS table has eight records, how many records does the following query produce? SELECT FROM customers CROSS JOIN ordersi a. 0 b. 8 C.7 d. 15 e. 56 14. Which of the following SQL statements is not valid? a. SELECT b.isbn, p.name FROM books b NATURAL JOIN publisher p SELECT ?sbn, name b. FROM books b, publisher p WHERE b.pubid- p.pubid; C. SELECT isbn, name FROM books b JOIN publisher p ON b. pubid = p, pubid; d. SELECT isbn, name FROM books JOIN publisher USING (pubid) None-all the above are valid SQL statements. e. 15. Which of the following lists all books published by the publisher named Printing Is Us? a. SELECT title FROM books NATURAL JOIN publisher WHERE name'PRINTING IS US Chapter 9

Explanation / Answer

Let me know if you have any doubts.

Answer 13) e.56
Explanation: Cross join is the cross product of rows contained in the two tables i.e.
7 rows X 8 rows => 56 rows

Answer 14) a
Explanation: Ambiguous columns must be referred with the table qualifiers.


Answer 15) a

Explanation: b is not valid because of where condition.
'c' option is not valid because it will give all the information but in question it is
asking for only list of books.

Answer 16) b
Explanation: The query 'b' raises an exception "ORA-01468: a predicate may reference only one
outer-joined table".


Answer 17) b

Answer 18) b. line 3
Explanation: : Since the tables used in the query have a qualifier, the columns must be referred
using the same

Answer 19) b.30
Explanation: A table alias can consist of a maximum of 30 characters.

Answer 20) c
Explanation: 'b' option is not valid because of missing condition for join.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote