0% found this document useful (0 votes)
3 views6 pages

Oracle SQL Interview Question

The document is a comprehensive list of interview questions related to Oracle SQL and PL/SQL, covering a wide range of topics including differences between SQL commands, types of triggers, views, indexes, exceptions, and constraints. It also includes practical scenarios and questions about performance issues, data integrity, and the use of various SQL functions. The document serves as a resource for preparing for an Oracle SQL and PL/SQL interview.

Uploaded by

Alex Abhisek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Oracle SQL Interview Question

The document is a comprehensive list of interview questions related to Oracle SQL and PL/SQL, covering a wide range of topics including differences between SQL commands, types of triggers, views, indexes, exceptions, and constraints. It also includes practical scenarios and questions about performance issues, data integrity, and the use of various SQL functions. The document serves as a resource for preparing for an Oracle SQL and PL/SQL interview.

Uploaded by

Alex Abhisek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

ORACLE SQL AND PL/SQL INTERVIEW

QUESTION
1. What is the difference between “Delete” & “Truncate”?
2. What us the difference between “Procedure” & Function”?
3. What is the difference between NVL, NVL2, NULLIF, COALESCE?
4. What is the difference between RANK & DENSE RANK?
5. What are the different types of SQL Statement?
6. How to get unique records without using “DISTINCT” in Oracle?
7. What is DUAL table in oracle, Explain with examples?
8. What is trigger?
9. What are the types of triggers?
10.What is the purpose of triggers in database?
11.What is the difference between DML & DDL?
12.Similarities & Difference DECODE & CASE?
13.Difference between REPLACE & TRANSLATE?
14. What is view?
15.What is Simple view?
16.What is Complex View?
17.Are DML’s allowed on view?
18. Difference between “Simple” & “Complex” view?
19.Can we use “DML” & “DDL” Statements inside function?
20.Can we use “OUT” and “INOUT” parameter in function?
21.Can function return more than one value?
22.Difference between VIEW AND MATERIALIZED VIEW?
23. What is set operator? Difference between “UNION” &
“UNIONALL”, “INSERT” & “MINUS”?
24. What is %ROWTYPE and % TYPE? What is the advantage of using
“%rowtype” & “%type”?
25. What is index? How to create index?
26.What are the types of index?
27.How to find the list of indexes for a given table?
28.Explain B-tree index?
a. What is B-tree index? How index data is stored?
b. Where to find the metadata information?
c. How to find whether index is used by the query?
d. When to create B-tree index?
e. What types of scan operations B-tree index will do?
f. Can we create index for all columns?
g. What are advantages/dis adv. Of B-tree index?
29.Explain Bitmap index
30.Explain “Function based” index?
31.Explain “Reverse Key” index?
32.When to choose what type of index?
33.How to know index is being used?
34.How to monitor index usage?
35.What are the Benefits/drawbacks of index?
36.What are the types of DML triggers?
37.What is the order of execution if there is more than one trigger
exits?
38.What is SQL Loader?
39.What is the difference between VARRAY, NESTED TABLE,
ASSOCIATIVE ARRAY.
40.What is “INSTEAD OF ” Trigger?
41.What is Error/Exception in PLSQL? How to handle Exception on
PLSQL?
42.What are the types of Exception?
43.What is “PRAGMA exception_init”?
44.What is “Raise_application_error”?
45.What is “SQLERRM” & “SQLCODE”?
46.What is “SUBQUERY”? What are the types of “SUBQUERY”?
47.EXPLAIN “Simple Subquery” and its types with an example?
48.Explain “Correlated Subquery” with an example?
49.“Inline View” Vs “SUBQUERY”?
50.“NULL” related practical question?
51.NULL & Order by?
52.Difference between “IN” & “ANY”?
53.SQL Loader & External Table?
54.RANK & DENSE_RANK AS “Aggregate” & “Analytical” Function
55.Query was running fine till yesterday, but suddenly its very slow
form today, how would you start your analysis?
56.What is Cursor? What are the types of cursors?
57.What is explicit cursor? How to access the value using explicit
Cursor?
58.What are the cursor attributes?
59.What is parameterized cursor? For cursor?
60.What is ref cursor? Strongly typed ref cursor vs weakly typed?
61.What is “for update” & “where current of” clause in cursor?
62. Cursor vs collection? When to use cursor & when to use
collection?
63.Named Cursor vs ref cursor?
Compound Trigger
64.What is “Compound trigger”?
65.Advantages of “Compound trigger”?
66.What is mutating trigger?
67.How to avoid mutating trigger error?
68.How to avoid “mutating trigger error” using compound trigger?
69.How to write SQL to delete duplicate records?
70.What’s maximum number of trigger (of different type) that can be
defined on same table?
71.What’s the “Order of Execution “ if there is more than one trigger
of different type on same table?
72.Can we define more than one trigger of “same type” on same
table?
73.“IF YES”, then what’s the order of execution ? and how to control
the order of execution?
74.What is PRAGMA autonomous_transaction?
75.Real time use case for “autonomous_transacton”?
76.What are the Advantage of packages in oracle?
77.I have a table with duplicates entries in production, I cannot
delete existing rows, However I want to prevent further duplicates
rows to get inserted. How can I do?
78.Does “creating a primary key constraint” always an index
automatically?
79.Will “Droping constraint”, will drop underlying index?
80.Will Dropping “TABLE”, will drop underlying index?
81.Can a “primary key” creates NONUNIQUE index?
82. We use “UNIQUE INDEX” or “UNIQUE CONSTRAINT” to enforce
uniqueness of a column. What’s the difference? And when to use
what?
83.Can I use? IGNORE_ROW_ON_DUPKEY_INDEX?
84.Can I use “Oracle error log table?”
85.While executing the insert statement INSERT INTO emp_target
SELECT * FROM emp_source;
I want only the “non-duplicate” record to get inserted, duplicate
records should get excluded during insertion How can I do?
86.Can I use MERGE Statement?
87.if is no primary key in TARGET table, then how to do this?
88.while executing the insert statement

INSERT INTO emp_target SELECT * FROM emp_source;


I want only the “non-duplicate records should get excluded
During insertion. How can I do?
89.Oracle “FORCE” view?
90.View “WITH READ ONLY” Constraint?
91. View “WITH CHECK OPTION” Constraint?
92. Write a procedure to create a view for all the tables in the

Given Schema. The view name should be same as table name


Suffixed with “_V”?
93.Difference between “FOR” VS “FORALL” STATEMENT?
94.Advantages of “FORALL”?
95.Limitation of “FORALL”?
96. What is “MERGE” Statement?
97.How to handle the exception raised from MERGE statement?
98.A view was created by selecting all the columns of tables eg:
CREATE OR REPLACE VIEW emp_view AS
SELECT *
FROM emp;
 If we add a NEW column to the base table, will that column
Get added to view?
 If we drop an existing column from the base table, what will
Happen to view?
 How to check the list of object used in a view?
99. How to compile view? Why to recompile view?
100. If we create a view before creating the base table using “FORCE VIEW”
How the columns get defined in view?
101. When we will use “FORCE” view in real-time?
102. ALL CONSOLIDATED VIEW RELATED QUESTION?
103. Oracle “TABLE FUNCTION”
104. Oracle “PIPELINED FUNCTION”?
105. Difference between “TABLE FUNCTION” & PIPELINED FUNCTION”?
“CONSTRAINTS” RELATED

106. What Is “Data integrity”?


107. What is “Constraint”?
108. Types Of “Constraint”?
109. “NOT NULL” Constraint?
110. “UNIQUE” Constraint?
a. What is “UNIQUE”Constraint?
b.How to define “UNIQUE” Constraint?
c. Where to check the metadata information?
d. How to enable / disable constraint?
e. How to drop constraint?
f. Other questions related to “UNIQUE” Constraint?
111. “PRIMARY KEY” CONSTRAINT?
a. What is “PRIMARY KEY” CONSTRAINT?
B.How to define ”PRIMARY KEY” Constraint?
c. Where to check the metadata information?
d. How to enable/ disable constraint?
e. How to drop Constraint?
f. Other questions related to “PRIMARY” constraint?

You might also like