for example: first create an object of type called an address; for this syntax or query, use: create an address_ty type as an object (street varchar2 (50), City char (10), Postal number (6));
now use this address_ty as a data type during table creation for example: create table Example (emp_name varchar2 (10), number emp_id (10), address address_ty); this will create an Example table having an Address as address_ty as a data type ..
Now paste the values ββinto the example table; Insert values ββinto the example ('Sandeep Kumar', 595, address_ty ('Snap on sector 126', 'Noida', 201301);
Thanx ....
source share