Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
PL

PL

Ratings: (0)|Views: 461|Likes:
Published by nagrajforever

More info:

Published by: nagrajforever on Feb 07, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

01/16/2013

pdf

text

original

 
COURSE MATERAL- PL-SQL
 
COURSE MATERALFor PL-SQL
It is advanced or superset of SQL.
1
COPY RIGHTS RESERVED FOR
PEERS TECHNOLOGIES (P)Ltd
 
COURSE MATERAL- PL-SQL
It deals with programming.It is called third generation programming language, since it contains all the standard rules of programming.Difference between SQL and PL/sQL is, SQL is called Non-Procedural language since it deals with onlyWHAT data to be extracted, whereas PL/SQL is called Procedural language, since it deals with WHATdata to be extracted and HOW it should be displayed.
PL/SQL supports to write a program in 2 ways;
1. Anonymous block programming.2. Stored block programming.1. Anonymous block programming : A program which is written in nameless block. This program will beresiding in Operating system since it is created in .sql file.2. Stored block programming : A program which is written in named block and resides in database server.It includes Stored procedures, Stored functions, Stored packages and Triggers.
Advantages of PL/SQL:1. Supports for SQL
: DDL, DML, TCL, DQL, pseudo columns, functions which are used at SQL, thesame can be used in PL/SQL.
2. Better performance :
At SQL only 1 command is sent for execution to a server whereas at PL/SQLgroup of commands are stored in the form of a block and can send them for execution at once to a server,by which performance of application gets increases.
3. Portability :
The program which is written in PL/SQL on one platform can easily be transfered to theother platform.
4. Tight Integration with SQL:
Datatypes used at SQL, the same can be used at PL/SQL. It alsoprovides the new datatype called Composite datatypes which includes 2 datatypes; %TYPE ,%ROWTYPE
5. Procedural Capabilities :
Input/Output statements, IF conditional statements, Looping constructs,GOTO statement etc which are used at programming languages, the same can be used at PL/SQL.
6. Modularity :
A large application program can get split into small modules or blocks.Anonymous block Programming:
2
COPY RIGHTS RESERVED FOR
PEERS TECHNOLOGIES (P)Ltd
 
COURSE MATERAL- PL-SQL
This program is created in .sql file and will be available at operating system.
This program consists of 3 blocks;1. Declaration block2. Execution block3. Exception block
1.
Declaration block:
At this block it allows a user to declare normal variables, constant variables,objects. This block is identified by a keyword called DECLARE.
2. Execution block:
At this block it allows a user to write all those statements by which program getsexecuted. This block is identified by a keyword called BEGIN.
3. Exception block:
At this block it allows a user to handle runtime errors. It is identified by a keywordcalled EXCEPTION.syntax:[DECLAREdeclaration part;]BEGINexection part;[EXCEPTIONexception handlers;]END;/
Datatypes used in PL/SQL program:
1. NUMBER2. CHAR3. VARCHAR2
3
COPY RIGHTS RESERVED FOR
PEERS TECHNOLOGIES (P)Ltd

Activity (6)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Maya John liked this
suganthi31 liked this
suganthi31 liked this
suganthi31 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->