Re: Question:

Поиск
Список
Период
Сортировка
От Mark Roberts
Тема Re: Question:
Дата
Msg-id 1213116588.9666.47.camel@localhost
обсуждение исходный текст
Ответ на Question:  ("Patricia Mitchell" <patricia-mitche@excite.com>)
Список pgsql-novice
You inherit the data as well, for example:

Parent Table:
[ 'column', ],
[ 1,        ],
[ 2,        ],

Child Table:
[ 'column', ],
[ 3,        ],
[ 4,        ],

select * from parent_table;
[ 'column', ],
[ 1,        ],
[ 2,        ],
[ 3,        ],
[ 4,        ],


For a more concrete example:

create table parent (
    col integer
);

create table child () inherits (parent);

insert into parent values (1);
insert into parent values (2);
insert into child values (1);
insert into child values (2);
insert into child values (3);
insert into child values (4);

select 'Selecting from parent';
select * from parent;

select 'Selecting from child';
select * from child;

Best of luck!

-Mark


On Tue, 2008-06-10 at 10:18 -0400, Patricia Mitchell wrote:
>
> When a table is a supertable of other tables and a subtable consists of identical rows of the supertable and then you
doa query on the supertable, would the identical rows be displayed twice since the rows appear in the supertable and
thesubtable? 
>
> When you inherit a table, are you inheriting the table definition/structure or are you inheriting the data as well?
>
> If the answer is only the table structure, then please ignore the question above?
>
> Thanks.
>
>
>
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
>


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Patricia Mitchell"
Дата:
Сообщение: Question:
Следующее
От: "JORGE MALDONADO"
Дата:
Сообщение: DATABASE CLONNING