Datasheet
54
Chapter 1
Introducing SQL
3. You issue the following SELECT statement on the EMP table shown in question 2.
SELECT (200+((salary*0.1)/2)) FROM emp;
What will happen to the result if all the parentheses are removed?
A. No difference, because the answer will always be NULL.
B. No difference, because the result will be the same.
C. The result will be higher.
D. The result will be lower.
4. In the following SELECT statement, which component is a literal? (Choose all that apply.)
SELECT ‘Employee Name: ‘ || ename
FROM emp where deptno = 10;
A. 10
B. ename
C. Employee Name:
D. ||
5. When you try to save 34567.2255 into a column defined as NUMBER(7,2), what value is
actually saved?
A. 34567.00
B. 34567.23
C. 34567.22
D. 3456.22
6. What is the default display length of the DATE datatype column?
A. 18
B. 9
C. 19
D. 6
7. What will happen if you query the EMP table shown in question 2 with the following?
SELECT empno, DISTINCT ename, salary FROM emp;
A. EMPNO, unique values of ENAME, and then SALARY are displayed.
B. EMPNO and unique values of the two columns, ENAME and SALARY, are displayed.
C. DISTINCT is not a valid keyword in SQL.
D. No values will be displayed because the statement will return an error.
8. Which clause in a query limits the rows selected?
A. ORDER BY
B. WHERE
C. SELECT
D. FROM
95127c01.indd 54 2/18/09 6:37:11 AM