Question: Inserting values in the object type: CREATE TYPE external_person AS OBJECT ( name VARCHAR2(30), phone VARCHAR2(20) ); CREATE TABLE contacts ( contact external_person udate DATE
Inserting values in the object type: CREATE TYPE external_person AS OBJECT ( name VARCHAR2(30), phone VARCHAR2(20) ); CREATE TABLE contacts ( contact external_person udate DATE ); INSERT INTO contacts VALUES ( external_person (NULL, NULL), '24-Jun -97' ); (1) Create user-defined types as follows: CREATE TYPE location as OBJECT( building_no NUMBER, city VARCHAR2(40) ); CREATE TYPE person as OBJECT( ssno NUMBER, name VARCHAR2(100), address VARCHAR2(100), office location ); CREATE TABLE persons of person; Insert a row into the persons table.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
