Selecting Records:
After the records are inserted in the table, selecting can be done in a normal way as how other table records are queried. Whenever records are selected from the table, the output will be as shown below:
SELECT * FROM deptab; # where deptab is a table name#
DEPNO DNAME LOC
--------- -------------------- --------------------
10 sales chennai
20 Purchase Bangalore
In an object table, every row is a row object. The object table differs from a normal relational table in the subsequent ways:
- Every row within the object table has an OID - an object identifier value - assigned through ORACLE when the row is created. OID is an identifier for a row object.
- Other objects within the database can reference the rows of an object table.
If the object table is based on an abstract datatype which uses no other abstract datatype, then the object table will behave as if it were a relational table. In the given example, the dep_type datatype does not use any other abstract datatype for any of its columns, then the deptab object table behaves as if deptab were a relational table.