Oracle 12c: SQL - Chapter 9

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A column qualifier indicates the *column* containing the data being referenced.

False

A cross join between two tables, containing four rows each, will display *eight* rows in its output.

False

A table alias can be assigned in the FROM clause, even when tables are being joined using the NATURAL JOIN keywords.

False

A table alias is assigned to a table in the WHERE clause.

False

A(n) *non-equality* join is also known as an equijoin, inner join, or simple join.

False

A(n) *non-equality* join is when a table is joined to itself.

False

An inequality join refers to a join that is used to link a table to a copy of itself.

False

Data stored in multiple tables can be combined through the use of an ORDER BY clause.

False

If a table alias is assigned in the *SELECT* clause, it must be used any time the table is referenced in that SQL statement.

False

If you are joining five tables in a SELECT statement, *five* joining conditions will be required.

False

If you are joining two tables in a SELECT statement, *three* joining conditions will be required.

False

The *JOIN...USING* keywords are used to join two tables that do not have a commonly named and defined column.

False

The JOIN keyword must be used in the *WHERE* clause of a SELECT statement.

False

The UNION set operator will not suppress rows that are returned by both queries.

False

Which of the following is a valid SQL statement?

SELECT c.customer#, order#, orderdate, shipdate FROM customers c, orders c WHERE c.customer# = o.customer#;

Which of the following SQL statements will return the names of all customers who placed an order on April 12, 2003?

SELECT lastname, firstname FROM customers NATURAL JOIN orders WHERE orderdate = '12-APR-03';

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?

SELECT lastname, firstname, order# FROM customers, orders WHERE orders.customer# (+) = customers.customer#;

Which of the following SQL statements will display the publisher name, book title, and retail price of all books that cost more than $35.95?

SELECT name, title, retail FROM books NATURAL JOIN publisher WHERE cost > 35.95;

Which of the following SQL statements will display the title and cost of each book stored in the BOOKS table, as well as the name of the contact person and the phone number to call to reorder the book?

SELECT title, cost, contact, phone FROM publisher JOIN books USING (pubid);

A Cartesian join can be created by not including a joining condition in the *WHERE* clause of a SELECT statement.

True

A table alias is assigned in the *FROM* clause.

True

A(n) *Cartesian Join* replicates each row from the first table with every row from the second table.

True

A(n) *inner join* will only include rows that have matching rows in the other table.

True

A(n) *non-equality* join is used when there are no equivalent rows of data in the tables that are being joined.

True

Column qualifiers must be included in the WHERE clause if the columns used to join the tables have the same column names.

True

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

True

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

True

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.

True

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

True

When a self-join is created, each copy of the table must be assigned a table alias.

True

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?

​2

To display the name of each customer and the title of each book purchased by the customers would require how many join conditions?

​3

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.

​90

Which of the following keywords is used to create a Cartesian join?

​CROSS JOIN

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?

​Cartesian join

The JOIN keyword is included in which of the following clauses?

​FROM

Which of the following is an example of assigning "o" as a table alias for the ORDERS table in the FROM clause?

​FROM orders o, customers c

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?

​INTERSECT

A table alias cannot be assigned in the FROM clause if which of the following keywords is used to join tables?

​NATURAL JOIN

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

​NATURAL JOIN

Which SQL statement will return the same results as the following SQL statement? SELECT * FROM orders, customers;

​SELECT * FROM orders CROSS JOIN customers;

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

​SELECT title FROM books NATURAL JOIN orderitems WHERE qty > 1;

Which of the following will display all books that were published at least three years before they were ordered?

​SELECT title FROM orders o, orderitems oi, books b WHERE b.isbn = oi.isbn AND oi.order# = o.order# AND (orderdate-pubdate)/365 >= 3;

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

​SELECT title FROM books MINUS SELECT title FROM books NATURAL JOIN orderitems;

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?

​both a and b

In Oracle12c, tables can be linked through which clause(s)?

​both b and c

Which of the following terms refers to a column with equivalent data that exists in two or more tables?

​common column

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

​equality join

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

​self-join

A(n) ____ is used to combine the results of two queries.

​set operator


Kaugnay na mga set ng pag-aaral

Chapter 11: Solid Waste Generation & Disposal.

View Set

Marketing Research (Burns/Bush) - Final Ch 4, 5

View Set

Physics Semester 1 Final Johnson/Vining

View Set

Section 5: Contract Law in Texas

View Set

Chapter 19: Postoperative Nursing Management

View Set

BIOL 1020 Chapter 21 Adaptive Quiz

View Set