Datasheet

Review Questions
57
D. SELECT * FROM ORDERS
WHERE PRODUCT_ID LIKE ‘DI\_’ ESCAPE ‘\’;
E. SELECT * FROM ORDERS
WHERE PRODUCT_ID LIKE ‘DI_%’ ESCAPE ‘\’;
15. COUNTRY_NAME and REGION_ID are valid column names in the COUNTRIES table. Which one
of the following statements will execute without an error?
A. SELECT country_name, region_id,
CASE region_id = 1 THEN ‘Europe’,
region_id = 2 THEN ‘America’,
region_id = 3 THEN ‘Asia’,
ELSE ‘Other’ END Continent
FROM countries;
B. SELECT country_name, region_id,
CASE (region_id WHEN 1 THEN ‘Europe’,
WHEN 2 THEN ‘America’,
WHEN 3 THEN ‘Asia’,
ELSE ‘Other’) Continent
FROM countries;
C. SELECT country_name, region_id,
CASE region_id WHEN 1 THEN ‘Europe’
WHEN 2 THEN ‘America’
WHEN 3 THEN ‘Asia’
ELSE ‘Other’ END Continent
FROM countries;
D. SELECT country_name, region_id,
CASE region_id WHEN 1 THEN ‘Europe’
WHEN 2 THEN ‘America’
WHEN 3 THEN ‘Asia’
ELSE ‘Other’ Continent
FROM countries;
16. Which special character is used to query all the columns from the table without listing each
column by name?
A. %
B. &
C. @
D. *
17. The EMPLOYEE table has the following data:
EMP_NAME HIRE_DATE SALARY
---------- --------- ----------
SMITH 17-DEC-90 800
ALLEN 20-FEB-91 1600
WARD 22-FEB-91 1250
JONES 02-APR-91 5975
WARDEN 28-SEP-91 1250
BLAKE 01-MAY-91 2850
95127c01.indd 57 2/18/09 6:37:12 AM