Select rows of the supertable without the ONLY keyword
A table hierarchy allows you to construct, in a single
SQL statement, a query whose scope is a supertable and its subtables.
A query on a supertable returns rows from both the supertable and
its subtables. The following query shows a query on the person table,
which is the root supertable in the table hierarchy.
Figure 1. Query
SELECT * FROM person
Figure 8 returns
all columns in the supertable and those columns in subtables (employee and sales_rep)
that are inherited from the supertable. A query on a supertable does
not return columns from subtables that are not in the supertable.
The query result shows the name, address,
and soc_sec columns in the person, employee,
and sales_rep tables.
Figure 2. Query result
name Rogers, J.
address ROW(102 Ruby Ave, Belmont, CA, 69055)
soc_sec 454849344
name Sallie, A.
address ROW(134 Rose St, San Carlos, CA, 69025)
soc_sec 348441214
⋮