Solution pack includes verified solutions with screenshots from Oracle 11g XE. Most
questions from past exam papers/assignments come from the End of Chapter
questions. If you work through the questions and are able to successfully complete
these on Oracle 11g XE by yourself, you will get a good mark in the exam!
, INF3707 Past Exam Papers
2018 OctNov exam
SECTION A: Multiple Choice Questions [30]
Choose the correct answer. Each correct answer carries 2 marks
Write down the question number and the letter of the correct answers or an answer (for example 1.1 B) in
your examination book
Question 1
1.1 Which of the following clauses are used to suppress duplicates in a SELECT statement?
Choose the best answer
A. INTERSECT, DISTINCT
B. DUPLICATE, INTERSECT
C. UNIQUE, INTERSECT
D. DISTINCT, UNIQUE
1.2 Determine the output of the query below
Select (100-25) / 15 * (20-3) from dual
A. 85
B. 0.294
C. -85
D. 63.67
1.3 Which of the following statements are correct about the WHERE clause?
A. Column Alias can be used in WHERE clause to refer a column
B. Functions can be used as operands un the WHERE clause
C. Comparison operator is an optional element in WHERE clause condition
D. There can be multiple WHERE clause in a SELECT query
1.4 Which of the following IS true about the SQL query given below?
SELECT col1, col2
FROM tabl
WHERE col1 = ‘A’
ORDER BY col2 DESC, col1,
A. It will display the row which has the col1 value as ‘A’ ordered by the col1 in the descending order and then col2 in
the descending order
B. The ORDER BY clause will not work as the keyword DESC should be always written in the end of the ORDER BY
clause and not In between as given in the query
C. The above query will be sorted in descending order on the basis of col2 only and the use of col1 in the ORDER BY
clause will be discarded
D. It will display the row which has the col1 value as ‘A’ ordered by the col1 and then followed by col2 as the
execution of the ORDER BY clause happens from the order of columns in the SELECT statement
,1.5 What does the following query do?
SELECT isbn, title
FROM BOOKS
WHERE (pubid, category) IN
(SELECT pubid, category FROM BOOKS WHERE title LIKE ‘%ORACLE%')
A. It determines which publisher published a book belonging to the Oracle category and then lists all other books
published by that same publisher
B. It lists all publishers and categories containing the value of ORACLE
C. None of the above. The query contains a multiple-row operator and because the inner query returns only one
value, the SELECT statement will fall and return an error message
D. It lists the ISBN and title of all books belonging to the same category and having the same publisher as any book
with the phrase ORACLE in its title
1.6 Refer to the table given below to answer the following questions
Which of the following SQL statements will display the profit generated by each book stored in the BOOKS tables
A. SELECT title, retail, cost
FROM books
B. SELECT title, retail - cost
FROM books
C. SELECT pubid, cost, retail FROM books
D. All of the above
1.7 Which type of a join is used In the following statement?
SELECT title, order#, quantity
FROM BOOKS FULL JOIN ORDERITEMS
ON BOOKS.ISBN = ORDERITEMS ISBN
A. quality
B. self-join
C. non-equality
D. none of the above
1.8 Which of the following displays a list of all system privileges available in Oracle?
A. SESSION_PRIVS
B. SYS-PRIVILEGE_MAP
C. V$SYSTEM_PRIVILEGES
D. SYSTEM_PRIVILEGE_MAP
, 1.9 Which of the following options allow a user to grant system privileges to other users?
A. WITH ADMIN OPTION
B. WITH GRANT OPTION
C. ASSIGN ROLES
D. SET ROLES
1.10 Which of the following commands changes a table's name from OLDNAME to NEWNAME?
A. RENAME oldname TO newname
B. REMANE table FROM oldname TO newname
C. ALTER TABLE oldname MODIFY TO newname
D. CREATE TABLE newname (SELECT * FROM oldname)
1.11 If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the
ORDERITEMS table, which of the following commands will disable the constraint?
A. ALTER TABLE orderitems
DISABLE PRIMARY KEY CONSTRAINT
B. ALTER TABLE orderitems
DISABLE CONSTRAINT orderitems_pk,
C. ALTER TABLE order1tems
REMOVE PRIMARY KEY CONSTRAINT,
D. ALTER TABLE orderitems
MODIFY PRIMARY KEY CONSTRAINT DISABLE,
1.12 Which of the following commands is used to add data to an existing row in a table?
A. ADD
B. UPDATE
C. INSERT
D. MODIFY
1.13 Which of the following commands is used to create a function-based index?
A. CREATE FUNCTION INDEX ... ON
B. CREATE INDEX ... ON
C. CREATE INDEX ... FOR
D. CREATE INDEX ... FUNCTION
1.14 Which command will delete a user account from a database?
A. DELETE USER username
B. DELETE USER username IDENTIFIED BY password
C. DROP USER username IDENTIFIED BY password
D. DROP USER username;
1.15 If a SELECT statement has WHERE GROUP BY and HAVING clauses, what is the order in which they are processed?
A. HAVING, WHERE, GROUP BY
B. WHERE, GROUP BY, HAVING
C. WHERE, HAVING, GROUP BY
D. GROUP BY,WHERE, HAVING
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur zaxisus. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €0,00. Vous n'êtes lié à rien après votre achat.