Basic Oracle Concepts and Programming Question: Download Questions PDF
How To Define a Variable of a Specific RECORD Type?
Answer:
Once 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;
/
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;
/
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Define a Specific RECORD Type? | How To Assign Values to Data Fields in RECORD Variables? |