table name as a column datatype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pravinasp
    New Member
    • Oct 2007
    • 20

    table name as a column datatype

    Hello all

    Recently I was playing with column data types and found that you can have a table name as the column's datatype although it looks like an "array object". For ex. if I have table1 and table2, it seems something like the following is possible..

    create table table2(id bigint,table1[]);

    Am just interested in what are the situations one would go for such an option? Any example or a direction for reading on this topic would be much appreciated.

    Thanks a lot.
  • pravinasp
    New Member
    • Oct 2007
    • 20

    #2
    Hello all,

    My bad, i should have mentioned it, am working on postgres. If anyone has used table as a columns datatype I would be glad to hear from you if you could tell me when to go for such an option.


    Cheers

    Comment

    Working...