Control Structure: This chapter shows you how to structure the flow of control through a PL/SQL program. There are three types of Control structure available in PL/SQL, These are Conditional constructs with the IF statements, CASE expression and LOOP control structure. IF Statements: In Oracle, the IF-THEN-ELSE statement is used to execute code when a
SQL Statements in PL/SQL: PL/SQL supports data manipulation language (DML) and transaction control language (COMMIT, ROLLBACK, SAVEPOINT). You can use DML commands to modify the data in a database table. PL/SQL dose not directly support DDL statements, such as – CREATE TABLE, ALTER TABLE, DROP TABLE. These statements are dynamic SQL statements. Dynamic statements are
Lexical Units: Lexical units include letters, numerals, special characters, tabs, spaces, returns and symbol that building a PL/SQL block. Lexical unit can classified as following… Identifier Delimiters Literals Comments Identifier: Identifier are the names given to PL/SQL objects. Quoted Identifier: Quoted identifier makes identifier case sensitive, include character such as space and use reserved words.
Composite data type: Composite data type stores values that have internal components. You can pass entire composite variables to subprograms as parameters, and you can access internal components of composite variables individually. Internal components can be either scalar or composite. You can use scalar components wherever you can use scalar variables or you can use
Variable: Variable are mainly used for temporary storage of data and manipulation of stored data. Variable can stored any PL/SQL objects, such as variables, types, cursors and subprograms. Variable can be used repeatedly in an application by referring to them in the statements. Identifier & Variable: Identifier are name of the variables. Variable are storage