| 1. | What kinds of commands can be entered at the command prompt in 9i SQL Plus? |
| a. | | PL/SQL Blocks |
| b. | | SQL*PLUS commands |
| c. | | Security commands |
| d. | | SQL commands
|
|
|
|
|
|
|
| 2. | What will happen if the emp table shown below is queried:
select enpno,DISTINCT ename,Salary from emp;
|
| a. | | EMPNO ,unique value of ENAME and then SALARY are displayed |
| b. | | EMPNO ,unique value 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
|
|
|
|
|
|
|
| 3. | Examine the description of the STUDENTS table:
| STD_ID | NUMBER (4) |
| COURSE_ID | VARCHAR2 (10) |
| START_DATE | DATE |
| END_DATE | DATE |
What are the aggregate functions valid on the START_DATE columns? |
| a. | | SUM(start_date) |
| b. | | AVG(start_date) |
| c. | | COUNT(start_date) |
| d. | | AVG(start_date, end_date) |
| e. | | MIN(start_date)
|
|
|
|
|
|
|
| 4. | Evaluate the following SQL statement:
SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales WHERE e.employee_id = s.emp_id;
What will happen if all the parentheses are removed from the calculation? |
| a. | | The value displayed in the CALC_VALUE column will be lower |
| b. | | The value displayed in the CALC_VALUE column will be higher |
| c. | | There will be no difference in the value displayed in the CALC_VALUE column |
| d. | | An error will be reported
|
|
|
|
|
|
|
| 5. | Which SQL statement is used to search for strings that contain 'SA_' in the JOB_ID column? |
| a. | | SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA\_%' ESCAPE '\'; |
| b. | | SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_'; |
| c. | | SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_' ESCAPE "\"; |
| d. | | SELECT employee_id, last_name, job_id FROM employees WHERE job_id = '%SA_';
|
|
|
|
|
|
|
| 6. | Which of the following statements are correct with regard to WHERE and HAVING clauses? |
| a. | | A WHERE clause can be used to restrict both rows and groups |
| b. | | A WHERE clause can be used to restrict rows only |
| c. | | A HAVING clause can be used to restrict both rows and groups |
| d. | | A HAVING clause can be used to restrict groups only |
| e. | | A HAVING clause CANNOT be used in Subqueries
|
|
|
|
|
|
|
| 7. | Which of the following substitution variables should be used to reuse the variable value without prompting the user each time? |
| a. | | & |
| b. | | ACCEPT |
| c. | | PROMPT |
| d. | | &&
|
|
|
|
|
|
|
| 8. | Evaluate the following SQL statement:
SELECT item_id, order_id, product_id FROM item
Which WHERE clause should be included to test the QUANTITY column for null values? |
| a. | | WHERE quantity = NULL; |
| b. | | WHERE quantity != NULL; |
| c. | | WHERE quantity <> NULL; |
| d. | | WHERE quantity IS NULL;
|
|
|
|
|
|
|
| 9. | Which of the following statements about the evaluation of clauses in a SELECT statement are true? |
| a. | | The Oracle Server will evaluate a HAVING clause before a WHERE clause |
| b. | | The Oracle Server will evaluate a WHERE clause before a GROUP BY clause |
| c. | | The Oracle Server will evaluate a GROUP BY clause before a HAVING clause |
| d. | | The Oracle Server will evaluate an ORDER BY clause before a WHERE clause |
| e. | | The Oracle Server will evaluate an ORDER BY clause before a HAVING clause
|
|
|
|
|
|
|
| 10. | Examine the following SQL statement:
SELECT bonus FROM salary WHERE bonus BETWEEN 1 AND 250 OR (bonus IN(190, 500, 600) AND bonus BETWEEN 250 AND 500);
Which value could the statement return? |
| a. | | 100 |
| b. | | 260 |
| c. | | 400 |
| d. | | 600
|
|
|
|
|
|
|
| 11. | Evaluate the following SQL*Plus command:
COLUMN emp_name HEADING 'NAME' FORMAT A25
Which tasks will this command accomplish? |
| a. | | It will set the EMP_NAME column heading to 'NAME' |
| b. | | It will center the column heading of the EMP_NAME column |
| c. | | It will limit the EMP_NAME column heading to 25 characters |
| d. | | It will set the display width of the EMP_NAME column to 25 |
| e. | | It will display the current settings for the EMP_NAME column
|
|
|
|
|
|
|
| 12. | A database was queried with the following command:
SELECT name FROM employee WHERE name LIKE '_a%';
Which names will be displayed? |
| a. | | Names starting with "a" |
| b. | | Names containing "a" as any letter except the first |
| c. | | Names containing "a" as the second letter |
| d. | | Names containing "a" as any letter except the first
|
|
|
|
|
|
|
What others think about Oracle Test - Oracle 9i SQL OCP I- OCP Practice |
| By: jen on Oct 6, 2009 |
| | very informative. and illuminating. with series of educational questions. |
|
 |
| By: Jen on Oct 6, 2009 |
|
 |
| By: Singh on Jun 14, 2009 |
|
 |
| By: venugopalreddy on Jun 12, 2009 |
| | it is so useful so plz add some more.... |
|
 |
| By: Jane on May 28, 2009 |
|
 |
| By: naveed_1223@yahoo.com on Feb 25, 2009 |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |
| By: Nagarjuna on Jan 27, 2009 |
| | It's very good Questions. thank you for providing this test |
|
 |