Records Flashcards

1
Q

What is a record

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of records can PLSQL handle

A

Table based
Cursor based
User-defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Table based record

A

%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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Cursor Based record

A

Cursor cur_emp is
Select * from emp where emp_no = 12345;

Rec_emp cur_emp%ROWTYPE;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

User defined records

A

Can define records %rowtype attribute

Set up your own record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly