Records Flashcards
What is a record
Another type of data type which oracle allows to be defined as a placeholder.
Composite data types - means a combination of different scalar data types like (char, varch2, number etc.). Each scalar data type holds a value.
Contains all the contents of a row.
What types of records can PLSQL handle
Table based
Cursor based
User-defined
Table based record
%ROWTYPE attributes enables a programmer to create table-based and cursor-based records
Rec_emp emp%ROWTYPE;
Select * into rec_emp from emp where emp no = 12345
Cursor Based record
Cursor cur_emp is
Select * from emp where emp_no = 12345;
Rec_emp cur_emp%ROWTYPE;
User defined records
Can define records %rowtype attribute
Set up your own record