Академический Документы
Профессиональный Документы
Культура Документы
by value and if matches return corresponding result else return default and if default is
omitted return null
syntax: decode(gender,m,1,f,1,0);
10. What is NVL operator and what is the syntax when u have used in Oracle Apps?
it is function used to deal with null values.it return value if found col value null else
What is set operator and what are the types what is the diff between Set operators
and Joins?
These operators are used to join the o/p of 2 queries.
Types: union, union all, intersect, minus.
Difference - Set operator require same structure of both queries while join need not
require this
13. What is View? What is the advantage? What are the types of views we have?
It is also a db objects .it is virtual table that is not having data of its own.
Easy retrieval of the data from database
Types: updatable, not updateable (or) simple ,complex
14. When we can not update the view?
When it contains joins, set operators, Rownum, group by ,having
15. What is Materialized view and what is Snap shot?
It is replicas of data from remote database, local copy of remote table, used for
16. What is the diff between Materialized view and Snap shot?
No difference
17. What are the Inline views?
18. What is synonym and what are the types and what is the advantage?
Synonym is an alternate name for a table, view.
Two types public, private
19. What is Index? Advantage of Index? Types of Indexes?
Create indexes if u frequently want to retrieve less than 15% of the rows in a large table
o Index columns used for join to improve the performance on joins.
o Dont use indexes on tables having less no rows.
o If the column has non-unique values u can use indexes on these columns.
o Dont use indexes if the data type is lob, CLOB & BLOB.
o If the table is read only we can create more indexes on the table.
o We can't create indexes on views.
o Indexes are logically & physically independent of data
o If the index is developed all applications continue to function
executed once based on that out query will be executed for each row.
22. What is the syntax for To Date function?
To_Date (DD-MON-RR)
23. What is diff between Replace and Translate?
Replace is to replace character by character in a string
Where as Translate is used for to replace string
24. What are the Pseudo columns we have?
They behave like table columns, but are not actually stored in the table.
o CURRVAL, NEXTVAL, ROWID, ROWNUM, SYSDATE, LEVEL, USER, UID
PARSING:
It checks the Syntax of SQL Statements.
25. How to execute DOS Commands from SQL Prompt?
HOST
26. How can we find out no of Indexes we have create against a Table?
USER_INDEXES
27. How to get second max salary from the table?
31. How to handle the table level locks and column level locks?
Shared/exclusive -When 2 transaction wants to read/write from db at the same time.
Table level, row level
Row Exclusive locks are obtained when updating, inserting or deleting rows
Duration of locks
All locks acquired during a transaction are released when the transaction is
committed
All locks are acquired during a transaction are released when the transaction is rolled
back
All locks are acquired after a savepoint are released when the transaction is rolled
back to the savepoint
Dead lock-It is will come in multi-user environment
When the two users issues update statements then dead lock will come
Dead- 1trans updates EMP and dep
2 trans update dep and EMP
Dead locks are released when commit/rollback statements are issued or logging off
34. Can we compare two Null values? Can we insert more than one null value in the
unique column?
No, Yes
35. How to handle null values?
NVL function
36. What are CBO and RBO? What is the diff between these two?
Cost Based optimization
Role Based optimization
37. What are the performing tuning levels?
38. What is Explain plan and what is TKPROFF?
39. How can u tune the query?
- EXPLAN_PLAN
40. How to display odd rows
PL/SQL:
1. What is Exception? Types of Exceptions? Exception Propagations?
Exception is a warning or error condition in oracle
o User defined
o Pre-defined
2. What is RAISE_APPLICATION_ERROR? And what is PRAGMA EXCEPTION_
INIT?
RAISE_APPLICATION_ERROR is an user defined exception, used explicitly
in triggers to display appropriate messages, it contains to parameters as message
code and message
User defined message codes are( -20,999 to -20,000)
PRAGMA EXCEPTION is used to write the our own error message with oracle
error number
predefined message codes are (-19,999 to -1)
so on
4. When we SELECT statement in the Execution block what are the Predefined
Predefined Exception
%NOT FOUND
CURSOR attribute
6. What is CURSOR? What are the Cursor types? What are cursor declaration steps?
Cursor is nothing but a private SQL work area which is used to store process
information.
Types Implicit Explicit
Declare Cursor
Open Cursor
Fetch Cursor
Close Cursor
7. What is the diff between Implicit and Explicit and Ref Cursor?
Implicit It is defined by the Oracle Server for queries that return only one row.
Explicit Which is defined by the Users, for queries that return more than one row
Ref With this we can change the select statement dynamically.
o Pass the cursor data as parameter to procedure or function.
o Without closing we can again open the cursor.
8. In which program u has used the Cursor? One example for implicit cursor?
9. What are the Cursor attributes we have?
%OPEN
%NOT FOUND
%FOUND
%ROWCOUNT
10. Can we issue the commit inside of the Cursor For Loop?
Yes
11. What is For Update OF Clause in the Cursors?
Is used in cursor to lock the rows first before u performs DML operations.
we need to recompile
Yes, we need to recompile the procedure by using below command
- ALTER PROCEDURE <proc_name> COMPILE
18. How to get the Procedure Source code from database?
Procedures
Functions
Variables
Cursors
Constants
21. How to Recompile the Package?
table?
Reports6i:
1. What is Frame, Repeating frame and Anchor Objects?
Frames are used to surround other objects and protect them from being overwritten or
WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH.
5. Where we will handle the Lexical parameters?
Data Model SQL Window
6. Tell me where u has used Lexical parameters in u r exp?
7. What are the report triggers?
Before parameter form
After parameter form
Before report
Between pages
After report
.
8.
9.
What is the diff between After Parameter Form and Before Report
Trigger?
The After Parameter Form trigger fires after the Runtime Parameter Form is displayed.
The Before Report trigger fires before the report is executed but after queries is parsed
and data is fetched.
10.
Validation triggers are PL/SQL functions that are executed when parameter values are
specified on the command line and when you accept the Runtime Parameter Form.
Action triggers are PL/SQL procedures executed when a button is selected in the Runtime
Preview. The trigger can be used to dynamically call another report (drill down) or execute
any other PL/SQL.
Report trigger execute PL/SQL functions at specific times during the execution and
formatting of your report.
Group filter determines which records to include in a group. You can use the packaged
filters, First and Last, to display the first n or last n records for the group, or you can create
your own filters using PL/SQL.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
If out put is 10 pages how many times between pages trigger will be
Fired? If cursors go from last page to first page weather the trigger
will be created?
9 times - 0 time
Forms6i:
1. When we open the form what are the triggers will be fired?
Per-form
Pre-block
Pre-record
Pre-item
When new form instance
When new block instance
When new record instance
When new item instance
2. What are trigger level? What is the sequence of triggers sequence firing? How to
stacked canvas?
Content canvas is the default canvas
We can resize the stacked canvas, stacked canvases can be operated parallel where as
content not possible,
Stacked canvas is Used to hold extra/optional items
5. How to develop Tabular forms in D2k?
Go to block property palette and change the property called number of records
execution and before fetching the data and post query fires for each record and pre
query fires only once.
Pre-Query Validate the current query criteria or provide additional query criteria
programmatically, just before sending the SELECT statement to the database.
Post-Query Perform an action after fetching a record, such as looking up values in
other tables based on a value in the current record. Fires once for each record fetched
into the block.
7. While developing whether tables or views? If view how to handle the Non updatable
9. What is diff between property clauses and visual attributes? How to call visual attributes
dynamically?
Dynamically we cannot change property clauses where as visual attributes
SET_VA_PROPERTY (
va_id
VISUALATTRIBUTE
property
NUMBER
value
VARCHAR2 );
10. Can we write the triggers on Property clause? - Yes
11. What is the diff between CALL_FORM, OPEN_FORM, and NEW_FORM?
CALL_FORM:- Runs an indicated form while keeping the parent form active.
OPEN_FORM:- Opens the indicated form, open more than one form at the same time.
NEW_FORM:- Exits the current form and enters the indicated form.
12. What are the ways we can call the report from the form?
PROCEDURE RUN_PRODUCT(
product
module
NUMBER,
VARCHAR2,
commmode
execmode
location
paramlist_name
display
NUMBER,
NUMBER,
NUMBER,
VARCHAR2,
VARCHAR2);
FUNCTION RUN_REPORT_OBJECT
( report_id REPORT_OBJECT );
13. What is the diff between PRE-FORM and WHEN-NEW-FORM-INSTANCE?
Pre-Form:-Perform an action just before Form Builder navigates to the form from
16. What is the diff between standard procedure and form procedure?
It is stored in Database
It is stored along with form
17. What are the object groups?
An object group is a container for a group of objects. You define an object group when
you want to package related objects so you can copy or subclass them in another
module.
18. What is the difference between Library and Package?
A library is a collection of subprograms, including user-named procedures, functions,
and packages.
A package is a PL/SQL construct that groups logically related types, objects,
procedures, and functions. Packages usually have two parts, a specification and a body,
although sometimes the body is unnecessary.
Library stored in client site while package is stored in client or server site.
sequence fire?
Key-next-item
Post-change
When-validate-item
Post-text-item
Pre-text-item
22. What are the areas we can use object groups?
An object group is a container for a group of objects. You define an object group when
you want to package related objects so you can copy or subclass them in another
module.
23. When we create Master detail form what are the triggers will gets created and at what
level and what are the names and what is the functionalities?
On-clear details-------Form level
On-populate details
(Non isolated)
On-check-delete-master-------------both are Block level
(cascade ) Pre-delete--------------Block level
24. What are the types of relation ships and what are the differences?
Join condition
Reference i.e., primary key and foreign key relationship.