This preview shows page 1. Sign up to view the full content.
Unformatted text preview: database columns. You can reference a table and column, or you can reference an owner, table, and column. my_dname scott.dept.dname%TYPE; Using %TYPE to declare my_dname has two advantages. First, you need not know the exact datatype of dname. Second, if the database definition of dname changes, the datatype of my_dname changes accordingly at run time. Using %ROWTYPE. The %ROWTYPE attribute provides a record type that represents a row in a table (or view). The record can store an entire row of data selected from the table or fetched by a cursor. emprec emp%rowtype; to access a field from the above variable use the dot notation emprec.ename,emprec.sal etc. ....
View Full Document
This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.
- Summer '10