Filters
Question type

Study Flashcards

   Structure of the PROMOTION table     Structure of the BOOKS table     Structure of the ORDERITEMS table -Which of the following SQL statements will display the gift or gifts that should be sent with order# 1003? A)  SELECT gift FROM promotion WHERE order# = 1003; B)  SELECT gift FROM promotion NATURAL JOIN books WHERE order# = 1003; C) isbn AND order# = 1003; D)  SELECT gift FROM promotion, orderitems oi, books b WHERE retail BETWEEN minretail AND maxretail AND oi.isbn = E)  none of the above Structure of the PROMOTION table    Structure of the PROMOTION table     Structure of the BOOKS table     Structure of the ORDERITEMS table -Which of the following SQL statements will display the gift or gifts that should be sent with order# 1003? A)  SELECT gift FROM promotion WHERE order# = 1003; B)  SELECT gift FROM promotion NATURAL JOIN books WHERE order# = 1003; C) isbn AND order# = 1003; D)  SELECT gift FROM promotion, orderitems oi, books b WHERE retail BETWEEN minretail AND maxretail AND oi.isbn = E)  none of the above Structure of the BOOKS table    Structure of the PROMOTION table     Structure of the BOOKS table     Structure of the ORDERITEMS table -Which of the following SQL statements will display the gift or gifts that should be sent with order# 1003? A)  SELECT gift FROM promotion WHERE order# = 1003; B)  SELECT gift FROM promotion NATURAL JOIN books WHERE order# = 1003; C) isbn AND order# = 1003; D)  SELECT gift FROM promotion, orderitems oi, books b WHERE retail BETWEEN minretail AND maxretail AND oi.isbn = E)  none of the above Structure of the ORDERITEMS table -Which of the following SQL statements will display the gift or gifts that should be sent with order# 1003?


A) SELECT gift
FROM promotion
WHERE order# = 1003;
B) SELECT gift
FROM promotion NATURAL JOIN books
WHERE order# = 1003;
C) isbn AND order# = 1003;
D) SELECT gift
FROM promotion, orderitems oi, books b
WHERE retail BETWEEN minretail AND maxretail
AND oi.isbn =
E) none of the above

Correct Answer

verifed

verified

The  outer join ‾\underline {\text { outer join } } operator is used to combine the results of multiple SELECT statements. _________________________

Correct Answer

verifed

verified

In a Cartesian join, linking a table that contains 10 rows to a table that contains 9 rows will result in ____ rows being displayed in the output.


A) 19
B) 18
C) 90
D) 89

Correct Answer

verifed

verified

A Cartesian join usually results from the user omitting the joining condition that links two or more tables together.

Correct Answer

verifed

verified

A(n) ____________________ join is used when the related columns between two tables cannot be joined through an equal sign.

Correct Answer

verifed

verified

non-equali...

View Answer

Which of the following keywords is used to create an equality join?


A) NATURAL JOIN
B) JOIN...ON
C) JOIN...USING
D) all of the above

Correct Answer

verifed

verified

The NATURAL JOIN keywords can be used to link two tables that have a commonly named and defined column.

Correct Answer

verifed

verified

Which of the following types of joins refers to joining a table to itself?


A) Cartesian join
B) equality join
C) self-join
D) outer join

Correct Answer

verifed

verified

An outer join only lists rows that contain a match in both tables.

Correct Answer

verifed

verified

   Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -To display the name of each customer and the ISBN of each book purchased by the customers would require how many joins in the FROM clause of the SQL statement? A)  4 B)  3 C)  2 D)  1 Structure of the CUSTOMERS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -To display the name of each customer and the ISBN of each book purchased by the customers would require how many joins in the FROM clause of the SQL statement? A)  4 B)  3 C)  2 D)  1 Structure of the ORDERS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -To display the name of each customer and the ISBN of each book purchased by the customers would require how many joins in the FROM clause of the SQL statement? A)  4 B)  3 C)  2 D)  1 Structure of the ORDERITEMS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -To display the name of each customer and the ISBN of each book purchased by the customers would require how many joins in the FROM clause of the SQL statement? A)  4 B)  3 C)  2 D)  1 Structure of the BOOKS table -To display the name of each customer and the ISBN of each book purchased by the customers would require how many joins in the FROM clause of the SQL statement?


A) 4
B) 3
C) 2
D) 1

Correct Answer

verifed

verified

   Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following SQL statements will display all customers who have not recently placed an order? A)  SELECT customer# FROM customers UNION SELECT customer# FROM orders; B)  SELECT customer# FROM orders MINUS SELECT customer# FROM customers; C)  SELECT customer# FROM orders INTERSECT SELECT customer# FROM customers; D)  SELECT customer# FROM customers MINUS SELECT customer# FROM orders; Structure of the ORDERS table    Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following SQL statements will display all customers who have not recently placed an order? A)  SELECT customer# FROM customers UNION SELECT customer# FROM orders; B)  SELECT customer# FROM orders MINUS SELECT customer# FROM customers; C)  SELECT customer# FROM orders INTERSECT SELECT customer# FROM customers; D)  SELECT customer# FROM customers MINUS SELECT customer# FROM orders; Structure of the CUSTOMERS table -Which of the following SQL statements will display all customers who have not recently placed an order?


A) SELECT customer# FROM customers
UNION
SELECT customer# FROM orders;
B) SELECT customer# FROM orders
MINUS
SELECT customer# FROM customers;
C) SELECT customer# FROM orders
INTERSECT
SELECT customer# FROM customers;
D) SELECT customer# FROM customers
MINUS
SELECT customer# FROM orders;

Correct Answer

verifed

verified

   Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following queries will display data from both the ORDERS and CUSTOMERS tables? A)  SELECT * FROM orders, customers; B)  SELECT lastname, firstname, order# FROM orders NATURAL JOIN customers; C)  SELECT lastname, firstname, order# FROM orders, customers WHERE orders.customer# = customers.customer#; D)  all of the above Structure of the ORDERS table    Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following queries will display data from both the ORDERS and CUSTOMERS tables? A)  SELECT * FROM orders, customers; B)  SELECT lastname, firstname, order# FROM orders NATURAL JOIN customers; C)  SELECT lastname, firstname, order# FROM orders, customers WHERE orders.customer# = customers.customer#; D)  all of the above Structure of the CUSTOMERS table -Which of the following queries will display data from both the ORDERS and CUSTOMERS tables?


A) SELECT * FROM orders, customers;
B) SELECT lastname, firstname, order#
FROM orders NATURAL JOIN customers;
C) SELECT lastname, firstname, order#
FROM orders, customers
WHERE orders.customer# = customers.customer#;
D) all of the above

Correct Answer

verifed

verified

The ____________________ set operator is used to display the results that were returned by the first query that were not also returned by the second query.

Correct Answer

verifed

verified

The outer join operator is placed on the side of the comparison that is deficient or is missing the matching rows.

Correct Answer

verifed

verified

   Structure of the BOOKS table     Structure of the PUBLISHER table -Which of the following will display the title, publication date, and publisher name of each book in the BUSINESS category? A)  SELECT title, pubdate, name FROM publisher JOIN books USING (pubid)  WHERE category = 'BUSINESS'; B)  SELECT title, pubdate, name FROM publisher JOIN books ON (pubid)  WHERE category = 'BUSINESS'; C)  SELECT title, pubdate, name FROM publisher OUTER JOIN books USING (pubid)  WHERE category = 'BUSINESS'; D)  SELECT title, pubdate, name FROM publisher CROSS JOIN books USING (pubid)  WHERE category = 'BUSINESS'; Structure of the BOOKS table    Structure of the BOOKS table     Structure of the PUBLISHER table -Which of the following will display the title, publication date, and publisher name of each book in the BUSINESS category? A)  SELECT title, pubdate, name FROM publisher JOIN books USING (pubid)  WHERE category = 'BUSINESS'; B)  SELECT title, pubdate, name FROM publisher JOIN books ON (pubid)  WHERE category = 'BUSINESS'; C)  SELECT title, pubdate, name FROM publisher OUTER JOIN books USING (pubid)  WHERE category = 'BUSINESS'; D)  SELECT title, pubdate, name FROM publisher CROSS JOIN books USING (pubid)  WHERE category = 'BUSINESS'; Structure of the PUBLISHER table -Which of the following will display the title, publication date, and publisher name of each book in the BUSINESS category?


A) SELECT title, pubdate, name
FROM publisher JOIN books USING (pubid)
WHERE category = 'BUSINESS';
B) SELECT title, pubdate, name
FROM publisher JOIN books ON (pubid)
WHERE category = 'BUSINESS';
C) SELECT title, pubdate, name
FROM publisher OUTER JOIN books USING (pubid)
WHERE category = 'BUSINESS';
D) SELECT title, pubdate, name
FROM publisher CROSS JOIN books USING (pubid)
WHERE category = 'BUSINESS';

Correct Answer

verifed

verified

   Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -Which of the following SQL statements will display the title of the books ordered by customer# 1003? A)  SELECT title FROM customers NATURAL JOIN books WHERE customer# = 1003; B)  SELECT title FROM customers JOIN orders USING (customer#)  JOIN orderitems USING (order#)  JOIN books USING (isbn)  WHERE customer# = 1003; C)  SELECT title FROM customers JOIN orders ON (customer#)  JOIN orderitems ON (order#)  JOIN books ON (isbn)  WHERE customer# = 1003; D)  both a and b Structure of the CUSTOMERS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -Which of the following SQL statements will display the title of the books ordered by customer# 1003? A)  SELECT title FROM customers NATURAL JOIN books WHERE customer# = 1003; B)  SELECT title FROM customers JOIN orders USING (customer#)  JOIN orderitems USING (order#)  JOIN books USING (isbn)  WHERE customer# = 1003; C)  SELECT title FROM customers JOIN orders ON (customer#)  JOIN orderitems ON (order#)  JOIN books ON (isbn)  WHERE customer# = 1003; D)  both a and b Structure of the ORDERS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -Which of the following SQL statements will display the title of the books ordered by customer# 1003? A)  SELECT title FROM customers NATURAL JOIN books WHERE customer# = 1003; B)  SELECT title FROM customers JOIN orders USING (customer#)  JOIN orderitems USING (order#)  JOIN books USING (isbn)  WHERE customer# = 1003; C)  SELECT title FROM customers JOIN orders ON (customer#)  JOIN orderitems ON (order#)  JOIN books ON (isbn)  WHERE customer# = 1003; D)  both a and b Structure of the ORDERITEMS table    Structure of the CUSTOMERS table     Structure of the ORDERS table     Structure of the ORDERITEMS table     Structure of the BOOKS table -Which of the following SQL statements will display the title of the books ordered by customer# 1003? A)  SELECT title FROM customers NATURAL JOIN books WHERE customer# = 1003; B)  SELECT title FROM customers JOIN orders USING (customer#)  JOIN orderitems USING (order#)  JOIN books USING (isbn)  WHERE customer# = 1003; C)  SELECT title FROM customers JOIN orders ON (customer#)  JOIN orderitems ON (order#)  JOIN books ON (isbn)  WHERE customer# = 1003; D)  both a and b Structure of the BOOKS table -Which of the following SQL statements will display the title of the books ordered by customer# 1003?


A) SELECT title
FROM customers NATURAL JOIN books
WHERE customer# = 1003;
B) SELECT title
FROM customers JOIN orders USING (customer#)
JOIN orderitems USING (order#) JOIN books USING (isbn)
WHERE customer# = 1003;
C) SELECT title
FROM customers JOIN orders ON (customer#)
JOIN orderitems ON (order#) JOIN books ON (isbn)
WHERE customer# = 1003;
D) both a and b

Correct Answer

verifed

verified

A column qualifier is separated from the column name with a colon.

Correct Answer

verifed

verified

In which of the following examples is the ORDERS table used as a column qualifier?


A) o.order#
B) orders.order#
C) order#.o
D) order#.orders

Correct Answer

verifed

verified

Which of the following set operators can be used to make certain that only the rows returned by both queries are displayed in the results?


A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS

Correct Answer

verifed

verified

Which of the following is used to create an outer join in a WHERE clause?


A) FULL OUTER JOIN keywords
B) LEFT OUTER JOIN keywords
C) RIGHT OUTER JOIN keywords
D) outer join operator (+)

Correct Answer

verifed

verified

Showing 101 - 120 of 131

Related Exams

Show Answer