Filters
Question type

Study Flashcards

Equality, non-equality, and self-joins are broadly categorized as  outer ‾\underline {\text { outer }} joins. _________________________

A) True
B) False

Correct Answer

verifed

verified

The ____________________ keywords create a join automatically between two tables, based on columns with matching names.

Correct Answer

verifed

verified

Which of the following SQL statements will display books that have not been ordered recently?


A) SELECT title
FROM books, orderitems
WHERE books.isbn <> orderitems.isbn;
B) SELECT title
FROM books NATURAL JOIN orderitems
WHERE JOIN IS NULL;
C) SELECT title FROM books NATURAL JOIN orderitems
MINUS
SELECT title FROM books;
D) SELECT title FROM books
MINUS
SELECT title FROM books NATURAL JOIN orderitems;

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

Which of the following types of joins refers to results consisting of each row from the first table being replicated from every row in the second table?


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

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

A(n)  outer ‾\underline { \text { outer } } join can be created by not including a joining condition in a SELECT statement. _________________________

A) True
B) False

Correct Answer

verifed

verified

   Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following queries will return the same results as the following SQL statement? SELECT A)  SELECT customer#, lastname, firstname, order# FROM customers NATURAL JOIN orders; B)  SELECT customer#, lastname, firstname, order# FROM customers JOIN orders USING (customer#) ; C)  SELECT c.customer#, lastname, firstname, order# FROM customers c, orders o; D)  both a and b Structure of the ORDERS table    Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following queries will return the same results as the following SQL statement? SELECT A)  SELECT customer#, lastname, firstname, order# FROM customers NATURAL JOIN orders; B)  SELECT customer#, lastname, firstname, order# FROM customers JOIN orders USING (customer#) ; C)  SELECT c.customer#, lastname, firstname, order# FROM customers c, orders o; D)  both a and b Structure of the CUSTOMERS table -Which of the following queries will return the same results as the following SQL statement? SELECT


A) SELECT customer#, lastname, firstname, order#
FROM customers NATURAL JOIN orders;
B) SELECT customer#, lastname, firstname, order#
FROM customers JOIN orders USING (customer#) ;
C) SELECT c.customer#, lastname, firstname, order# FROM customers c, orders o;
D) both a and b

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

The  outer join ‾\underline {\text { outer join } } operator is placed on the side of the joining condition that references the table containing the deficient rows. _________________________

A) True
B) False

Correct Answer

verifed

verified

A table alias is assigned in the  FROM ‾\underline { \text { FROM } } clause. _________________________

A) True
B) False

Correct Answer

verifed

verified

The NATURAL JOIN keywords can be used to create non-equality joins.

A) True
B) False

Correct Answer

verifed

verified

   Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following SQL statements will list the name of each customer stored in the CUSTOMERS table, and, if the customer has placed an order that is contained in the ORDERS table, the order# of any order each customer has placed? A)  SELECT lastname, firstname, order# FROM customers NATURAL JOIN orders WHERE orders.customer# IS NOT NULL; B)  SELECT lastname, firstname, order# FROM customers, orders WHERE orders.customer# (+)  = customers.customer#; C)  SELECT lastname, firstname, order# FROM customers, orders WHERE orders.customer# = customers.customer# (+) ; D)  SELECT lastname, firstname, order# FROM customers NATURAL JOIN orders WHERE orders.customer# IS NULL; Structure of the ORDERS table    Structure of the ORDERS table     Structure of the CUSTOMERS table -Which of the following SQL statements will list the name of each customer stored in the CUSTOMERS table, and, if the customer has placed an order that is contained in the ORDERS table, the order# of any order each customer has placed? A)  SELECT lastname, firstname, order# FROM customers NATURAL JOIN orders WHERE orders.customer# IS NOT NULL; B)  SELECT lastname, firstname, order# FROM customers, orders WHERE orders.customer# (+)  = customers.customer#; C)  SELECT lastname, firstname, order# FROM customers, orders WHERE orders.customer# = customers.customer# (+) ; D)  SELECT lastname, firstname, order# FROM customers NATURAL JOIN orders WHERE orders.customer# IS NULL; Structure of the CUSTOMERS table -Which of the following SQL statements will list the name of each customer stored in the CUSTOMERS table, and, if the customer has placed an order that is contained in the ORDERS table, the order# of any order each customer has placed?


A) SELECT lastname, firstname, order#
FROM customers NATURAL JOIN orders
WHERE orders.customer# IS NOT NULL;
B) SELECT lastname, firstname, order#
FROM customers, orders
WHERE orders.customer# (+) = customers.customer#;
C) SELECT lastname, firstname, order#
FROM customers, orders
WHERE orders.customer# = customers.customer# (+) ;
D) SELECT lastname, firstname, order#
FROM customers NATURAL JOIN orders
WHERE orders.customer# IS NULL;

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

A Cartesian join can be created by not including a joining condition in the  WHERE ‾\underline { \text { WHERE }} clause of a SELECT statement. _________________________

A) True
B) False

Correct Answer

verifed

verified

The ____________________ set operator is used to display the combined results returned by multiple SELECT statements.

Correct Answer

verifed

verified

A column ____________________ indicates the table containing the column being referenced.

Correct Answer

verifed

verified

Which of the following SQL statements will display the title of all books that have had multiple copies requested in a single order?


A) SELECT title
FROM books NATURAL JOIN orderitems
WHERE qty > 1;
B) SELECT title
FROM books JOIN orderitems
WHERE qty > 1;
C) SELECT title
FROM books JOIN orderitems ON (isbn) JOIN orders ON (order#)
WHERE qty>1;
D) SELECT title
FROM books JOIN orderitems USING(isbn) ;

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Structure of the CUSTOMERS table Structure of the CUSTOMERS table    -Which of the following queries will display the first and last name of the individual who referred another customer, along with the customer# of the referred customer? A)  SELECT r.firstname, r.lastname, c.customer# FROM customers r, customers c WHERE r.customer# = c.referred; B)  SELECT r.firstname, r.lastname, c.customer# FROM customers r JOIN customers c ON r.customer# = c.referred; C)  SELECT r.firstname, r.lastname, c.customer# FROM customers r NATURAL JOIN customers c; D)  both a and b -Which of the following queries will display the first and last name of the individual who referred another customer, along with the customer# of the referred customer?


A) SELECT r.firstname, r.lastname, c.customer# FROM customers r, customers c
WHERE r.customer# = c.referred;
B) SELECT r.firstname, r.lastname, c.customer# FROM customers r JOIN customers c
ON r.customer# = c.referred;
C) SELECT r.firstname, r.lastname, c.customer# FROM customers r NATURAL JOIN customers c;
D) both a and b

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

The JOIN keyword is used in the WHERE clause to indicate the tables that should be joined or linked.

A) True
B) False

Correct Answer

verifed

verified

A column qualifier indicates the  column ‾\underline { \text { column } } containing the data being referenced. _________________________

A) True
B) False

Correct Answer

verifed

verified

A column qualifier is separated from the column using which symbol?


A) comma (,)
B) plus sign (+)
C) period (.)
D) percent sign (%)

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

Which of the following can only be used to link tables that have a common column?


A) FULL OUTER JOIN
B) JOIN...ON
C) NATURAL JOIN
D) CROSS JOIN

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

The number of joining conditions required to join tables is always one less than the number of tables being joined.

A) True
B) False

Correct Answer

verifed

verified

Showing 21 - 40 of 131

Related Exams

Show Answer