How To Define a Variable of a Specific RECORD Type?
Submitted by: AdministratorOnce you have your specific RECORD type defined, you can define new variables with this specific RECORD type like any other data type. In the sample script below, several variables are defined with a regular data type and a specific RECORD type:
CREATE OR REPLACE PROCEDURE HELLO AS
TYPE student IS RECORD (
id NUMBER(5),
first_name VARCHAR(80),
last_name VARCHAR(80)
);
best_student student;
another_student student;
class_name VARCHAR2(80);
BEGIN
NULL;
END;
/
Submitted by: Administrator
CREATE OR REPLACE PROCEDURE HELLO AS
TYPE student IS RECORD (
id NUMBER(5),
first_name VARCHAR(80),
last_name VARCHAR(80)
);
best_student student;
another_student student;
class_name VARCHAR2(80);
BEGIN
NULL;
END;
/
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How Run SQL*Plus Commands That Are Stored in a Local File? |
☺ | How Much Memory Your 10g XE Server Is Using? |
☺ | How To Run SQL*Plus Commands in SQL Developer? |
☺ | What Is the Relation of a User Account and a Schema? |
☺ | What Is Input Buffer in SQL*Plus? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |