Basic HTML version of Foils prepared 7 October 97

Foil 33 An Example of PL/SQL Stored Procedure - II

From untitled presentation ARL Database Tutorial -- February 98. by Gang Cheng, C.W. Ou, Geoffrey C. Fox


We now define some PL/SQL variables to reference database entries fetched in previous SELECT command
lname person_info_table.last_name%TYPE;
  • -- a variable to hold last name fname person_info_table.first_name%TYPE;
  • -- a variable to hold first name
phone phone_list_table.phone_no%TYPE;
  • -- a variable to hold phone no. ptype phone_list_table.phone_type%TYPE;
  • -- a variable to hold phone type
-- Note format tablename.columnname to
reference database variables and %TYPE syntax to inherit database type in PL/SQL datatype



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Feb 5 1998