Datasheet

Review Questions
55
9. The following listing shows the records of the EMP table:
EMPNO ENAME SALARY COMM DEPTNO
--------- ---------- --------- --------- ---------
7369 SMITH 800 20
7499 ALLEN 1600 300 30
7521 WARD 1250 500 30
7566 JONES 2975 20
7654 MARTIN 1250 1400 30
7698 BLAKE 2850 30
7782 CLARK 2450 24500 10
7788 SCOTT 3000 20
7839 KING 5000 50000 10
7844 TURNER 1500 0 30
7876 ADAMS 1100 20
7900 JAMES 950 30
7902 FORD 3000 20
7934 MILLER 1300 13000 10
When you issue the following query, which value will be displayed in the first row?
SELECT empno
FROM emp
WHERE deptno = 10
ORDER BY ename DESC;
A. MILLER
B. 7934
C. 7876
D. No rows will be returned because ename cannot be used in the ORDER BY clause.
10. Refer to the listing of records in the EMP table in question 9. How many rows will the fol-
lowing query return?
SELECT * FROM emp WHERE ename BETWEEN ‘A’ AND ‘C’
A. 4
B. 2
C. A character column cannot be used in the BETWEEN operator.
D. 3
95127c01.indd 55 2/18/09 6:37:11 AM