Filters
Question type

Study Flashcards

  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 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) ; 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 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) ; ​ 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 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) ; 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 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) ; Structure of the BOOKS table -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) ;

Correct Answer

verifed

verified

The most common type of join is an equijoin,which joins two or more tables together based upon the tables having equivalent data values in a common column.​

Correct Answer

verifed

verified

  ​ Contents of the PROMOTION table    Structure of the BOOKS table -Which of the following SQL statements will display the gift that should be sent to any customer who orders the book titled SHORTEST POEMS?​ A)  SELECT gift FROM promotion WHERE gift = minretail; B)  SELECT gift FROM promotion,books WHERE retail >= minretail AND title = 'SHORTEST POEMS'; C)  SELECT gift FROM promotion,books WHERE retail BETWEEN minretail AND maxretail AND title = 'SHORTEST POEMS'; D)  ​none of the above ​ Contents of the PROMOTION table   ​ Contents of the PROMOTION table    Structure of the BOOKS table -Which of the following SQL statements will display the gift that should be sent to any customer who orders the book titled SHORTEST POEMS?​ A)  SELECT gift FROM promotion WHERE gift = minretail; B)  SELECT gift FROM promotion,books WHERE retail >= minretail AND title = 'SHORTEST POEMS'; C)  SELECT gift FROM promotion,books WHERE retail BETWEEN minretail AND maxretail AND title = 'SHORTEST POEMS'; D)  ​none of the above Structure of the BOOKS table -Which of the following SQL statements will display the gift that should be sent to any customer who orders the book titled SHORTEST POEMS?​


A) SELECT gift FROM promotion
WHERE gift = minretail;
B) SELECT gift FROM promotion,books
WHERE retail >= minretail AND title = 'SHORTEST POEMS';
C) SELECT gift FROM promotion,books
WHERE retail BETWEEN minretail AND maxretail
AND title = 'SHORTEST POEMS';
D) ​none of the above

Correct Answer

verifed

verified

​To display rows from one table that do not have a corresponding row in the other table,you must create a(n)____________________ join.

Correct Answer

verifed

verified

A self-join can only be specified in the FROM clause with the use of the JOIN...____________________ keywords.

Correct Answer

verifed

verified

Which of the following types of joins is created by matching equivalent values in each table?​


A) ​Cartesian join
B) ​equality join
C) ​non-equality 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

​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

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

​A(n)____________________ outer join is necessary when you need rows returned from either table that do not have a matching record in the other table.

Correct Answer

verifed

verified

Equality,non-equality,and self-joins are all categorized as inner joins.​

Correct Answer

verifed

verified

​A full outer join cannot be created in the ____________________ clause.

Correct Answer

verifed

verified

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

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

If you are joining four tables in a SELECT statement,three joining conditions will be required._________________________​

Correct Answer

verifed

verified

  Structure of the BOOKS table    Structure of the PUBLISHER table -Which of the following SQL statements will display the name of each publisher that publishes a book classified in the COMPUTER category?​ A)  SELECT UNIQUE name FROM books,publisher; B)  SELECT UNIQUE name FROM books NATURAL JOIN publisher WHERE category = 'COMPUTER'; C)  SELECT DISTINCT name FROM books JOIN publisher WHERE category = 'COMPUTER'; D)  ​both b and c Structure of the BOOKS table   Structure of the BOOKS table    Structure of the PUBLISHER table -Which of the following SQL statements will display the name of each publisher that publishes a book classified in the COMPUTER category?​ A)  SELECT UNIQUE name FROM books,publisher; B)  SELECT UNIQUE name FROM books NATURAL JOIN publisher WHERE category = 'COMPUTER'; C)  SELECT DISTINCT name FROM books JOIN publisher WHERE category = 'COMPUTER'; D)  ​both b and c Structure of the PUBLISHER table -Which of the following SQL statements will display the name of each publisher that publishes a book classified in the COMPUTER category?​


A) SELECT UNIQUE name
FROM books,publisher;
B) SELECT UNIQUE name
FROM books NATURAL JOIN publisher
WHERE category = 'COMPUTER';
C) SELECT DISTINCT name
FROM books JOIN publisher
WHERE category = 'COMPUTER';
D) ​both b and c

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

____________________ operators are used to combine the results of multiple queries.

Correct Answer

verifed

verified

​The outer join operator in the WHERE clause cannot be used with which of the following operators?


A) ​IN
B) ​OR
C) ​AND
D) ​both a and b

Correct Answer

verifed

verified

A table alias is assigned in the FROM clause._________________________​

Correct Answer

verifed

verified

Showing 41 - 60 of 119

Related Exams

Show Answer