| Character Sets | 
| Lexical Units | 
| Data Types | 
| Declarations | 
| References to identifiers | 
| Scope and visibility of identifiers | 
| Assigning Values to variables | 
| Expressions | 
| Error-reporting functions | 
| SQL Functions in PL/SQL Expressions | 
| Pragmas | 
| Conditional Compilation | 
Character Sets
Single-byte vs Multi-byte representation
(a) Database CS
- Stored source text of PL/SQL units
- Character values of data types CHAR, VARCHAR2, CLOB, and LONG
- Character values of data types NCHAR, NVARCHAR2 and NCLOB
Lexical Units
| Delimiters | Identifiers | Literals | Comments | Whitespace | 
Identifiers name PL/SQL Elements. Reserved words and Keywords should not be used as identifiers.
- Predefined identifiers are declared in the predefined package STANDARD.
- User-defined (ordinary or Quoted)
To list all predefined identifiers:
select type_name from all_types where predefined='YES';
Data Types
(a) Scalar data types
Can have subtypes. A data type and its subtypes comprise a data type family.
| PL/SQL scalar data types are: 
 
 | 
(b) Composite data types
- These are structured data types. They have internal components (scalar or composite) that can be individually accessed. Composite variables can be passed as parameter.
- Two types: Collections and Records.
| Collections | 
 | 
| Records | 
 | 
Click here for more information on Oracle and SQL Data types...
Declarations
| Variables | Constants | Initial Values | NOT NULL Constraint | %TYPE attribute | 
|  | 
If the declaration is in a block or subprogram, the initial value is assigned to the variable or constant every time control passes to the block or subprogram.
If the declaration is in a package specification, the initial value is assigned to the variable or constant for each session (whether the variable or constant is public or private).
 

