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
- Summer '10
- Imperative programming, reserved word, type attribute, subprogram