Respectively the remaining phone attribute set
Chapter 12: Database Objects 421
CREATE TABLE object_customers2 OF t_person2;
ID FIRST_NAME LAST_NAME DOB PHONE---------- ---------- ---------- --------- -------- 1 Jeff Jones 17-JUN-07 555-1212
The next INSERT statement adds another object to the table; notice that four parameters are passed to the t_person2 constructor:
The next INSERT statement adds another object to the table; notice that five parameters are passed to the t_person2 constructor:
INSERT INTO object_customers2
VALUES (
t_person2(3, 'Jeremy', 'Hill', '05-JUN-1975', '555-1214') );
ID FIRST_NAME LAST_NAME DOB PHONE---------- ---------- ---------- --------- -------- 3 Jeremy Hill 05-JUN-75 555-1214
Overriding Methods
When you create a subtype under a supertype, you can override a method in the supertype with a method in the subtype. This gives you a very flexible way of defining methods in a hierarchy of types.