Summary About Oracle PL/SQL (Part 1)

  • Basic syntax:
    DECLARE
    <declaration section>
    BEGIN
    <executable section>
    EXCEPTION
    <exception section>
    END;
    
  • To declare a variable : *name_of_variable* *datatype* := *defaultvalue*;
  • %type : used for declare variables with relation to the data type of a column in an existing table.
  • %rowtype : used in cursors to declare a single variable which contain a single record from resultset of a cursor or table without needing to specify individual variable.
  • Constant : in variable declaration its mean that the variable does not allowed to be changed.
  • Condition syntax:
    IF (thecondition) THEN
    <the process>
    END IF;
    

    with else condition Continue reading “Summary About Oracle PL/SQL (Part 1)”

Advertisement