Issue time07:37:51 am, by admin_sippsin Email 25 views
Categories: Oracle General

The SQL statement which are built at run time are called the Dynamic SQL.  Dynamic SQL can be built by using DBMS_SQL package.

Procedure of Dynamic SQL

OPEN_CURSOR, PARSE, BIND_VARIABLE, DEFINE_COLUMN, EXECUTE, FETCH_ROWS, CLOSE_CURSOR.

Oracle8i onwards there is another built in to construct Dynamic SQL called EXECUTE_IMMEDIATE.

Issue time07:36:56 am, by admin_sippsin Email 18 views
Categories: Oracle General

A Package is a PL/SQL Construct that allow related object to be stored together.

Package contains 2 parts, Package Specification and Package Body, each stored separately in the Data Dicitionary.
Once the Package is called all the related Procedure and functions of the package gets compiled and stored in the memory as P-code.

 

How do u call a Package?

<PackageName>.<Procedure / Function Name> (Related Parameters….)

Issue time07:36:13 am, by admin_sippsin Email 10 views
Categories: Oracle General

Cursor is a private SQL area created in SGA to do multi row operation in a PL/SQL programme

Explicit Cursor, Implicit Cursor.

Implicit Cursor: System (Oracle) automatically declares and uses for all DML SQL Statements.

Explicit Cursor: Cursor declared explicitly in the PL/SQL programme to do multi row operation

Syntax:


Declare
Cursor C1 is SELECT SAL, EMPNO FROM EMP
X number;
Y Varchar2(30);
Begin
Open C1;
Loop
Fetch C1 INTO x, y;
Exit when c1%NOTFOUND
End Loop;
End;

Issue time07:35:05 am, by admin_sippsin Email 3 views
Categories: Oracle General

An Index is a DB object, which is used to improve the performance of  the data retrieval.

CREATE INDEX <INDEX NAME> ON <TABLE name>.(<COLUMN name>)

Types of Indexes:

Bitmap Index (Used for Low cardinality column)
Btree Index  (Used for high cardinality column)

Issue time07:34:09 am, by admin_sippsin Email 19 views
Categories: Oracle General

 

Equi Join: When primary and foreign key relationship exists between the tables that are going to be joined.

Cartesian Join: When tables are joined without giving any join condition.

Inner Join
: The resultant set includes all the rows that satisfy the join condition.

Outer Join
: The resultant set includes the rows which doesn’t satisfy the join condition.  The outer join operator Plus sign (+) will be included in the join condiiton.

Example: SELECT a. column1, a. column2, b.column3….. from a, b where a.column1(+)=b.Column1

Here the rows from table a which doesn’t satisfy the join condition will also be fetched.

Search

OraclePassport Members

XML Feeds

Hit Counter

Powered by b2evolution