Revision Notes for Class 12 Informatics Practices Getting Started With Pl SQL
Class 12 Informatics Practices students should refer to the following concepts and notes for Getting Started With Pl SQL in standard 12. These exam notes for Grade 12 Informatics Practices will be very useful for upcoming class tests and examinations and help you to score good marks
Getting Started With Pl SQL Notes Class 12 Informatics Practices
CBSE Class 12 Informatics Practices Getting Started With pl sql study notes. Learning the important concepts is very important for every student to get better marks in examinations. The concepts should be clear which will help in faster learning. The attached concepts made as per NCERT and CBSE pattern will help the student to understand the chapter and score better marks in the exaages.minations.
GETTING STARTED WITH PL/SQL
SQL Vs PL/SQL:
Limitations of SQL are:
• No procedural capabilities .
• Time Consuming Processing or Network traffic.
• No Error Handling Routines/Procedures.
Advantages of PL/SQL are:
•Procedural Capabilities.
• Reduced Network Traffic.
• Error Handling Procedures/Routines.
• Facilitates Sharing.
• Improved Transaction Performance.
• Portable Code.
ANCHORED DECLARTION:
It refers to a declaration where a variable is declared with another variable or a table column used as its anchor.
PL/SQL use %TYPE declaration attribute for anchoring.
Ex: num1 NUMBER(5);
num2 num1%TYPE;
empsal Emp.Salary%TYPE;
Note: Anchored types are evaluated at compile time.Thus,you need to recompile the change of
underlying type in the anchored variable.
TYPES OF PL/SQL VARIABLES:
• Local Variables.
• Substitution Variables.
• Bind or Host Variables.
PL/SQL BLOCK STRUCTURES:
DECLARE
/* definitions of
BEGIN
[EXCEPTION]
END;
TYPES OF BLOCKS:
• Anonymous Blocks: Blocks without headers.
• Named Blocks: Blocks having headers or labels like procedure,functions,packages or triggers.
PL/SQL CONTROL STRUCTURES:
• Sequence
• Selection
• Iteration.
SELECTION CONSTRUCT: (Condition Testing or Decision Making Statements)
1. Simple IF:-
Syntax:
IF
Statement
END IF;
Example:
DECLARE
a number;
BEGIN
a :=&a;
if a>100 THEN
dbms_output.put_line(a);
END IF;
2. IF…THEN…ELSE…END IF:-
Syntax:
IF
Statement1;
ELSE
Statement2;
END IF;
Example:
DECLARE
a number;
b number;
BEGIN
a :=&a;
b :=&b;
if a>b THEN
dbms_output.put_line(a);
ELSE
dbms_output.put_line(b);
END IF;
Please click the link below to download pdf file for CBSE Class 12 Informatics Practices Getting Started With pl sql study notes