CSIT156Chap8

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

comparison operator

A(n) ____ is used to indicate how data should relate to a given search condition.

SELECT category, title FROM books ORDER BY 1 ASC, 2 DESC;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will return the category and title of all books stored in the BOOKS table presented in order of their category and, for the books in the same category, sort the title of the books in descending order?

none of the above

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SELECT statements will retrieve all orders contained in the ORDERS table that have not yet been shipped to the customer?

SELECT * FROM books WHERE pubid = 1;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following SQL statements will retrieve all books published by the publisher assigned Pubid 1?

selection

The process of retrieving only certain rows based upon a specified condition is known as ____.

SELECT title, retail FROM books ORDER BY title;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will list the title and retail price of each book stored in the BOOKS table, sorted in order of the book titles?

SELECT title FROM books WHERE (category = 'BUSINESS' OR category ='COMPUTER' ) AND retail >35;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will retrieve all book titles that are in the Business or Computer category and have a retail price of more than $35.00?

all of the above

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will retrieve all books published in 2001?

SELECT * FROM books WHERE pubid = 1 OR pubid = 2 OR retail >= 42;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will retrieve all books stored in the BOOKS table with Pubid 1 or 2 or that have a retail price of at least $42.00?

SELECT * FROM books WHERE cost >= 25.00;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will return all books that cost at least $25.00?

both b and c

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will display all orders shipped between April 4, 2003 and April 5, 2003?

SELECT title, retail FROM books ORDER BY category, retail;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will display the title and retail price of each book stored in the BOOKS table in order of category and retail price?

SELECT * FROM books WHERE retail >38 ORDER BY retail;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will list all books stored in the BOOKS table with a retail price of more than $38 sorted by retail price?

SELECT * FROM books WHERE (retail-cost)/cost > .60;

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will display all books stored in the BOOKS table that generate more than 60 percent profit?

SELECT * FROM orders WHERE shipdate IS NOT NULL;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SQL statements will display all orders contained in the ORDERS table that have been shipped to the customer?

SELECT order#, shipdate-orderdate FROM orders WHERE order# = 1007;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SQL statements will display how long it took to ship order # 1007 (based upon when the order was originally placed)?

SELECT * FROM orders WHERE customer# = 1020 AND shipdate IS NULL;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SQL statements will list all orders placed by customer # 1020 that have not yet been shipped?

SELECT * FROM orders WHERE shipdate-orderdate >= 3;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will display all orders that were not shipped for at least three days after the order was received?

SELECT * FROM orders WHERE shipdate IS NOT NULL ORDER BY customer#, order#;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will list all orders contained in the ORDERS table that have been shipped based upon the customer# and order#?

SELECT * FROM orders WHERE shipcity = 'Atlanta' OR shipcity = 'Seattle';

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will not list the orders that have been shipped to Atlanta or Seattle?

SELECT * FROM orders WHERE shipdate-orderdate <= 3;

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will return all orders shipped within three days after the order was received?

numeric

When sorting the results in ascending order, which of the following values will be presented first in the output?

NULL

When sorting the results in ascending order, which of the following values will be presented last in the output?

NULL

When sorting the results in descending order, which of the following values will be presented first in the output?

numeric

When sorting the results in descending order, which of the following values will be presented last in the output?

arithmetic operations

When the WHERE clause contains multiple types of operators, which of the following is resolved first?

logical operators

When the WHERE clause contains multiple types of operators, which of the following is resolved last?

ORDER BY

Which of the following clauses is used to indicate a particular sort sequence for presenting query results?

WHERE

Which of the following clauses is used to restrict the rows returned by a query?

all of the above

Which of the following is a valid comparison operator?

all of the above

Which of the following is a valid logical operator?

=>

Which of the following is not a valid comparison operator?

AND

Which of the following operators can be used to combine search conditions?

none of the above

Which of the following operators can be used to retrieve rows containing NULL values in a specific column?

LIKE

Which of the following operators is used when the criteria is based upon a search pattern?

>=

Which of the following operators would be most appropriate to determine whether or not the retail price of a book is at least $24.00?

SELECT * FROM orders WHERE orderdate LIKE '%MAR%';

Which of the following queries will display all orders placed in the month of March?

ColB IS NULL

Which of the following search conditions can be used to identify records that do not have data stored in a column named ColB?

ColB IS NOT NULL

Which of the following search conditions can be used to identify records that have data stored in a column named ColB?

%H%

Which of the following search patterns could be used to find the word HELLO in Oracle11g?

%03

Which of the following search patterns would find dates occurring only in the year 2003?

percent sign (%)

Which of the following symbols is a wildcard character that can represent any number of characters in a WHERE clause?

255

The maximum number of columns that can be specified for sorting data is ____.

both a and b

The order in which NULL values appear in the results can be overridden by which of the following keywords?

NOT

Which of the following is NOT a comparison operator?

single quotation marks (' ')

If a user performs a query that restricts the rows returned based upon a specified date, the date must be enclosed in ____.

secondary sort

If there is an exact match between the data used for a primary sort, a(n) ____ can be used to determine the sequence used to display the data

only columns in the SELECT clause can be used for sorting

In regards to sorting, if a DISTINCT option is used in the SELECT clause of a query then ____.

ASC

To instruct Oracle11g to sort data in ascending order, enter ____ after the column name in the ORDER BY clause.

DESC

To instruct Oracle11g to sort data in descending order, enter ____ after the column name in the ORDER BY clause.


संबंधित स्टडी सेट्स

AH II Resp AQ + Chest Trauma (Exam 1)

View Set

Emerging and Reemerging Infectious Disease

View Set

Chapter Blood and Lymphatic/Immune System Canvas Worksheet

View Set

Week 5: Quality and Safety Frameworks for Nursing Practice

View Set

117 - Lighting and Small Appliance Branch Circuits

View Set

Chapter 16: Nursing Management During the Postpartum Period

View Set