1. What output will the follwing statement produce? Select NVL2(NULL,'NOT NULL', NULL) from dual; |
NULL |
NOT NULL |
Function NVL2 is not defined |
None of the above
|
2. Which three definitions are associated with implicit cursors? |
%rowtype, %toomanyrows, %found |
%found, %notfound, %rowcount |
%rowtype, %rowcount, %notfound |
None of the above
|
3. In this PL/SQL statement, which of the following lines will produce an error? |
cursor CAPITALS is |
select CITY, STATE |
into my_city, my_state |
from CITIES
|
4. In a PL/SQL block, a variable is declared as NUMBER without an initial value. What will its value be when it is first used in the executable section of the PL/SQL block? |
NULL |
0 |
Results in a compilation error |
An exception will be raised
|
5. PL/SQL raises an exception, in which TWO of the following cases: |
When a SELECT statement returns no rows |
When a SELECT statement returns more than one row |
When the datatypes of SELECT clause and INTO clause do not match |
When INTO statement is missing in the SELECT statement
|
6. PL/SQL raises an exception, in which TWO of the following cases: |
When a SELECT statement returns no rows |
When a SELECT statement returns more than one row |
When the datatypes of SELECT clause and INTO clause do not match |
bothab
|
7. What is the result if two NULL values are compared to each other? |
TRUE |
False |
Undefined |
NULL
|
8. Functions for error trapping are contained in which section of a PL/SQL block? |
Header |
Declarative |
Executable |
Exception
|
9. Which section of a PL/SQL block would most likely contain a RAISE statement? |
Header |
Declarative |
Executable |
Exception
|
10. Select the VALID trigger type(s)? |
AFTER statement trigger |
INSERT row trigger |
DELETE row trigger |
UPDATE row trigger
|
11. In this SQL statement, which of the following lines will produce an error? |
CREATE OR REPLACE TRIGGER check_age |
BEFORE INSERT OR UPDATE ON employee FOR EACH ROW |
IS |
years_old NUMBER;
|
12. In this PL/SQL statement, which of the following lines will produce an error? |
create or replace function vat (vat_rate IN NUMBER, price IN NUMBER) |
declare |
l_vat NUMBER; |
begin
|
13. For an unconditional approach to a particular part of a complex PL/SQL block, which of the following control structures can be used? |
If-Then-Else |
While loop |
GoTo |
Decode
|
14. Which of the following statements about an SQL statement are not correct? |
SQL statements can be on one or more lines. |
Keywords cannot be split across lines. |
SQL statements are not case-sensitive, unless indicated. |
Keywords can be abbreviated.
|
15. Suppose you have to remove a table. There are several indexes associated with this table. |
DROP INDEX |
DROP INDEX |
ALTER TABLE ....... DROP CONSTRAINT |
DROP TABLE
|
16. Which section of a PL/SQL block would most likely contain a RAISE statement? |
Header |
Declarative |
Executable |
Exception
|
17. What does the term 'locking' refer to? |
Locking is a process, which logs database usage. |
Locking is the process of database authentication. |
Locking is a process preventing users from reading data being changed by other users, and prevents concurrent users from changing the same data at the same time. |
|
18. What does ACID stand for? |
Access. Consistency. Isolation. Data. |
Atomicity. Consistency. Isolation. Durability. |
Access. Constraint. Index. Data. |
|
19. What is a database cursor? |
A blinking vertical line that indicates the location of the next input on the display screen. |
A cursor is SQL keyword specifying a retrieved data order. |
Cursor is acronym for Current Set Of Records and is a database object pointing to a currently selected set of records. |
|
20. Which SQL statement inserts data into a table called Projects? |
INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project') |
INSERT Projects ('Content Development', 'Website content development project') |
INSERT Projects VALUES ('Content Development', 'Website content development project') |
SAVE INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')
|