-
The table structure against which all the different types of records will be declared:
CREATE TABLE cust_sales_roundup (customer_id NUMBER (5), customer_name VARCHAR2 (100), total_sales NUMBER (15,2) );
-
The table-based record:
cust_sales_roundup_rec cust_sales_roundup%ROWTYPE;
-
The cursor-based record:
CURSOR cust_sales_cur IS SELECT * FROM cust_sales_roundup; cust_sales_rec cust_sales_cur%ROWTYPE;
-
The programmer-defined record:
TYPE customer_sales_rectype IS RECORD (customer_id NUMBER (5), customer_name customer.name%TYPE, total_sales NUMBER (15,2) ); top_customer_rec customer_sales_rectype;