Oracle Mock Test
Oracle Mock Test
What is the maximum number of handlers processed before the PL/SQL block
is exited when an exeception occurs?
a) Only One
c) all Referenced
d) None
3. You query the database with this command SELECT name FROM employee
WHERE name LIKE ‘_a%’; Which names are displayed?
a) Ampersand
b) Ellipses
c) Quotation marks
d) Asterisk
5. Which of the program declarations are correct for a stored program unit?
(choose 2)
a) RAISE_ERROR
b) SQLERRM
c) RAISE_APPLICATION_ERROR
d) RAISE_SERVER_ERROR
7. Which Oracle supplied package can you use to output values and messages
from database triggers, stored procedures and functions within SQL*Plus
a) DBMS_DISPLAY
b) DBMS_OUTPUT
c) DBMS_LIST
d) DBMS_DESCRIBE
8. You want to execute a procedure from SQL plus. However you are not given
the argument list for the procedure. Which command will display to show the
argument list?
a) DESCRIBE
b) SHOWLIST
c) SHOW ARG_LIST
d) SHOW PROCEDURE
9. Which data dictionary views gives you the names and the source code of the
procedure that you have created?
a) USER_SOURCE
b) USER_OBJECTS
c) USER_PROCEDURES
d) USER_SUBPROGRAMS
a) TRUE
b) FALSE
a) TRUE
b) FALSE
13.You want to display the details of employess whose lastname is smith. But
you are not sure in which case last names are stored. Which statement will
list all the employees whose last name is smith?
The SAL column stores the monthy salary of the employee. Which change
must be made to the above syntax to calculate the annual compensation as
“monthly salary plus a monthly bonus of $100, multiplies by 12’?
15. Creating a foreign key constraint between columns of two tables defined
with two different datatypes will procedure an error.
a) True
b) False
a) From products
b) Where price>60.00
d) Order by sum(price);
b) Place the alias after each column, separated by white space, describe the
column.
c) Place the alias after each column, separated by a comma, to describe the
column.
d) Place the alias at the end of the statement to describe the table.
18.What is an Index?
a) WHERE clause
b) ORDER BY clause
c) JOIN clause
d) GROUP BY clause
22.You have decided to permanently remove all the data from the STUDENT
table and you need the table structure in the future. Which single command
will perform this?
b) A group function produces a one results from each row in the table.
24.In this PL/SQL statement, Which of the following lines will produce an error?
b) Declare
c) L_vat NUMBER;
d) Begin
e) No Error
25.Functions for error trapping are contained in which section of a PL/SQL block?
a) HEADER
b) DECLARATIVE
c) EXECUTABLE
d) EXCEPTION
a) %rowtype,%toomanyrows,%found
b) %found,%notfound,%rowcount
c) %rowtype,%rowcount,%notfound
30.If you don’t specify ASC or DESC after a SQL ORDER BY clause following is
used by default:
b) DESC.
c) ASC.
d) Random
31.What is a Trigger?
a) NULL
b) NOT NULL
c) When the datatypes of SELECT clause and INTO clause do not match
a) A blinking vertical line that indicates the location of the next input on the
display screen.
36.Which section of a PL/SQL block would most likely contain a RAISE statement?
a) Header
b) Declarative
c) Executable
d) Exception
37.Which of the following statements about an SQL statement are not correct?
a) SQL statements can be on one or more lines.
a) Records
b) Fields
c) Attributes
40.Can you use both HAVING and WHERE SQL clauses in one SQL statement?
a) TRUE
b) FALSE
41.Normalization is…
b) %notfound
c) %found
d) %rowcount
43.Which of the following statements does count the rows in the ‘Sales’ table?
a) 1
b) 2
c) 3
d) 0
e) 4
45.What best describes the relationship between indexes and SQL performance?
b) 1966_Invoices
c) Catch_#22
d) #Invoices
a) INSTR
b) SUBSTRING
c) SUBSTR
d) POS
50.To produce a meaningful result set without any Cartesian products, which is
the minimum number of conditions that should appear in the WHERE clause
of a four-table join?
a) 8
b) 2
c) 3
d) 4