Based upon the contents of the books table which of the


Identify the choice that best completes the statement or answers the question.

1. To indicate which database table contains the data to be selected by a query, the table name should be listed in the ____ clause.
a. SELECT c. WHERE
b. FROM  d. HAVING

2. Based upon the contents of the BOOKS table, which of the following is a valid SQL statement?
a. SELECT "The retail price of " || title || " is " retail FROM books;
b. SELECT * || is currently in our inventory FROM books;
c. SELECT title, || retail "Price" FROM books;
d. SELECT isbn || CHR(10) || title FROM books;

3. Based upon the contents of the BOOKS table, which of the following SQL statements will display the retail price for two copies of each book currently in inventory?
a. SELECT * FROM books;
b. SELECT title, retail+retail FROM books;
c. SELECT title, retail^2 FROM books;
d. none of the above

4. Which of the following operators can be used to retrieve rows containing NULL values in a specific column?
a. = c. NOT
b. LIKE d. none of the above

 

5. Which of the following operators can be used to retrieve rows containing NULL values in a specific column?
a. = c. NOT
b. LIKE d. none of the above

6. Based upon the contents of the BOOKS table, which of the following SQL statements will retrieve all books published by the publisher assigned Pubid 1?
a. SELECT * FROM books WHERE pubid LIKE "1";
b. SELECT * FROM books WHERE pubid = 1;
c. SELECT * FROM books WHERE pubid > 1;
d. both a and b

7. Which of the following queries will display all orders that were not shipped for at least three days after the order was received?
a. SELECT * FROM orders WHERE shipdate-orderdate => 3;
b. SELECT * FROM orders WHERE shipdate-orderdate >= 3;
c. SELECT * FROM orders WHERE NOT shipdate-orderdate => 3;
d. SELECT * FROM orders WHERE NOT shipdate-orderdate >= 3;

8. Based upon the contents of the ORDERS table, which of the following SQL statements will display the number of days between the date an order was placed and the date it was shipped?

a. SELECT order#, TO_CHAR(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
b. SELECT order#, MONTHS_BETWEEN(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
c. SELECT order#, ADD_MONTHS(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
d. SELECT order#, DAYS_BETWEEN(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;

9. Based upon the contents of the ORDERS table, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323?
a. SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders;
b. SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders WHERE shipzip = 323;
c. SELECT order# FROM orders WHERE shipzip = SUBSTR(shipzip, 1, 323);
d. SELECT order# FROM orders WHERE SUBSTR(shipzip, 1, 3) = 323;

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Based upon the contents of the books table which of the
Reference No:- TGS0668971

Now Priced at $40 (50% Discount)

Recommended (99%)

Rated (4.3/5)