Alter user-defined type to add a new attribute : Alter Type « Object Oriented Database « Oracle PL / SQL






Alter user-defined type to add a new attribute

 
SQL>
SQL>
SQL> create or replace type person as object(
  2   first_name varchar2(100),
  3   last_name varchar2(100) );
  4  /

SQL>
SQL>
SQL> alter type person add attribute ssn varchar2(11) INVALIDATE;

Type altered.

SQL>
SQL> drop type person;

Type dropped.

SQL>
SQL>

 








Related examples in the same category

1.Alter a user-defined type
2.ALTER TYPE to add more methods and attributes