You define and declare records either in the declaration section of a PL/SQL block, or globally, via a package specification. A table-based record is one whose structure is drawn from the list of columns in the table. A table-based record is drawn from a particular table structure.
%TYPE and %ROWTYPE
%TYPE is used to declare a variable that is of the same type as a specified table’s column.
Emp_number emp.empno%type;
%ROWTYPE is used to declare a record i.e. a variable that represents the entire row of a table.
Emp_record emp%rowtype
Another example of Table Based Record
Declare table-based record for employee table.
emp_rec employee%ROWTYPE
PL/SQL Table Based Records
·
Oracle SQL
Archives
-
▼
2010
(49)
-
▼
February
(49)
- Null Values in SQL Group By
- Examples of SQL Having & SQL Group By
- SQL Inline Views
- SQL Join View
- Modifying SQL Views (Insert, Update and Delete on ...
- SQL Scalar subquery
- SQL Correlated Subquery
- SQL Inline View Subquery
- Examples of Oracle PL/SQL Cursors
- Oracle PL/SQL WHERE CURRENT OF & FOR UPDATE
- Oracle PL/SQL REF Cursors
- Oracle PL/SQL Cursors With Parameters
- Oracle PL/SQL Cursor For Loops
- Oracle PL/SQL Explicit Cursors
- Oracle PL/SQL Implicit Cursors
- PL/SQL Programmer Defined Records
- PL/SQL Cursor Based Records
- PL/SQL Table Based Records
- Oracle PL/SQL Nested Tables
- Oracle PL/SQL Varrays
- Oracle PL/SQL Tables
- Oracle PL/SQL Records
- SQL PL/SQL Interview Questions
- PL/SQL Triggers
- Oracle PL/SQL Cursors
- PL/SQL Collections
- PL/SQL Introduction
- Join Using Multiple Tables (more than 2)
- SQL Equi-join
- SQL Cross Join
- Example of SQL Self Join
- SQL Self Join
- Example of SQL Inner Join
- SQL Inner Join/ SQL Natural Join:
- Example of SQL Outer Join
- SQL Outer Join
- Example of Simple SQL Join
- SQL Interview Questions
- SQL Views
- SQL Subqueries
- SQL Having
- SQL Group By Examples
- SQL Group By
- SQL Joins
- SQL Delete
- SQL Update
- SQL Insert
- SQL Syntax
- SQL Introduction
-
▼
February
(49)