Examen pl/sql

Solo disponible en BuenasTareas
  • Páginas : 13 (3177 palabras )
  • Descarga(s) : 0
  • Publicado : 25 de marzo de 2011
Leer documento completo
Vista previa del texto
EXAM 1Z0-001:SQL & PL/SQL (Time: 90 Minutes)

Student Name : Exam Date :
Score Obtained : Start Time :

1. Which two characters require the ESCAPE option to be used as literals?
a. _
b. $
c. /
d. %

2. You attempt to create a view with this command:

CREATE VIEW parts_view
AS SELECT id_number, description, sum (quantity)
FROM inventory
WHERE id_number = 1234GROUP BY id_number;

Which clause causes an error?

a. CREATE VIEW parts_view
b. AS SELECT id_number, description, sum (quantity)
c. FROM inventory
d. WHERE id_number = 1234
e. GROUP BY id_number;

3. What is one of the purposes of a column constraint?

a. Enforce relationships between tables
b. Ensure that a column value is numeric rather than character
c. Enforce entityrules
d. Enforce business rules

4. Structure of "Inventory" table:

|Key Type |PK | | |FK | |
|Nulls/Reqd. |NN,U | |NN |NN | |
|FK Table | | | |Manufacturer | |
|FK Column | | | |ID_NUMBER ||
|Data Type |Number |Varchar2 |Varchar2 |Number |Number |
|Length |9 |26 |25 |9 |8.2 |

Based on the above table, evaluate this UPDATE statement:

UPDATE inventory
SETdescription = 'Sold Out'
WHERE id_number = 'A12345'
AND quantity = 0;

Which clause will cause an error?

a. UPDATE inventory
b. SET description = 'Sold Out'
c. WHERE id_number = 'A12345'
d. AND quantity = 0;
e. None of the above

5. The PL/SQL executable section contains which type of statements?

a. PL/SQL and SQL statements to manipulate data in the database
b. TheProcedure or Function name and input/output variable definitions
c. The definition of program variables, constants, exceptions and cursors
d. Statements to deal with error handling

6. What is the purpose of the IN operator?

a. Compare two similar values
b. Perform an equality comparison
c. Evaluate a range of values
d. Restrict results to a specified list of values

7. Evaluate thiscommand:

ALTER TABLE customer

Which task would this command accomplish?

a. Delete only the primary key values
b. Disable all dependent integrity constraints
c. Disable only the primary key constraint
d. Alter all dependent integrity constraint values

8. When can an index be placed on a view?

a. When you only SELECT from the viewb. When you only DELETE from the view
c. When there is a WITH CHECK OPTION used to create the view
d. When you can UPDATE using the view
e. Never

9. You query the database with this command:

SELECT manufacturer_desc
FROM manufacturer
WHERE manucafturer_id LIKE '%F\%B\%I\_%' ESCAPE''

For which character pattern will the LIKE operator be searching?

a. F%B%I_
b. FBI_c. F\%B\%I%\_
d. F\B\I\_

10. In the executable section of a PL/SQL block, you include this statement

Product.max_inventory1 := 30;

Which task will this accomplish?

a. A composite variable will be assigned a value
b. A constant will be assigned a value
c. An index identified will be assigned a value
d. A field/column in a record will be assigned a value
11. Structure of...
tracking img