Oracle Database Programming: PL/SQL programming basics Oracle Database Programming: basic concepts of Oracle databases http://www.bkjia.com/database/201307/226254.html 2. PL/SQL programming basics: PL/SQL block: declare defines part of the exception in execution part exception Handling part end mark when the dbms_output package is used to output data or messages, you must set the SQL * Plus environment variable serveroutput to on. For example, set serveroutput on command line: SQL> Use/End command line code. Data Type and variable: v _ variable name (Declaration variable); e _ variable name (declaration exception) scalar variable: varchar2 (4000); char (2000); number (p, s): 38 bytes; date: Day-month-year; boolean (true, false, null): only used for encoding; % type: Binding type, read as: What type. When you use the % type attribute to define a variable, it determines the type and length of the new variable based on the data column or other variables. Composite variable (multiple data with only Type Definitions): record table: v_emp emp % rowtype; when the % rowtype attribute is used to define record variables, the number, name, and type of the record Members must be the same as the number and name Type of the column displayed or attempted. LOB variables: variables used to store big data, including internal LOB and external LOB. Internal LOB variables include GLOB of novels and BLOB of photos; external LOB only stores bfiles of movies.