views:

243

answers:

1

Say a table has several subclass types. How can I see all columns from different types in sqldeveloper? In table view, only can see common columns. Thanks.

+1  A: 

This is not possible in SQL Developer as it currently stands (as of 1.5.4).

Incidentally it isn't possible in SQL*PLus either. Setting DESCRIBE DEPTH 2 just shows more detail regarding the super type:

SQL> desc my_people
 Name                                      Null?    Type
 ----------------------------------------- -------- --------------------
 CREATE_DATE                               NOT NULL DATE
 ID                                        NOT NULL NUMBER
 DETAILS                                            PERSON

SQL> set describe depth 2
SQL> desc my_people
 Name                                      Null?    Type
 ----------------------------------------- -------- --------------------
 CREATE_DATE                               NOT NULL DATE
 ID                                        NOT NULL NUMBER
 DETAILS                                            PERSON
 PERSON is NOT FINAL
   NAME                                             VARCHAR2(30 CHAR)

SQL> 

(I checked. set describe depth 3 doesn't do anything, what it controls is the expansion of types used as attributes of the displayed types.)

I don't know the reason for sure but I would hazard a guess that it is something to do with the unbounded number of levels of sub-types permitted. Furthermore, Types are relatively new and still under appreciated in the database. Oracle is primarily relational and procedural, and the object-oriented features are treated as red-headed step-children.

Of course, SQL Developer is extensible, so it would be possible to write an addon which does this expansion. Hmmm....

APC