You have to insert in th centers-table. Because it is inherited from cities,
the record is automatically in cities. Search for SELECT * FROM ONLY in the
docs too.
> create table cities (id int, name varchar, primary key(id) );
> create table centers (state varchar(2)) inherits (cities);
>
> ant th
Yes, if you do
insert into cities values (1, 'Lajeado');
insert into centers values (1, 'Lajeado', 'AZ');
Then select * from cities will give you
1 Lajedo
1 Lajedo
And select * from centers will give
1 Lajedo AZ
However, if rather than duplicating the insert and just doing
In this case, when i do
select * from cities;
i'll have two tuples with the name 'Lajeado'.
Does it the only way i have ?
Thanks again,
Nasair JĂșnior da Silva
Lajeado - RS - Brasil.
Em Tue, 07 Jan 2003 12:02:13 +, Adam Witney <[EMAIL PROTECTED]> escreveu:
>On 7/1/03 11:42 am, "Nasair Junior
On 7/1/03 11:42 am, "Nasair Junior da Silva" <[EMAIL PROTECTED]> wrote:
> Hi people,
> supposing i have the tables :
>
> create table cities (id int, name varchar, primary key(id) );
> create table centers (state varchar(2)) inherits (cities);
>
> ant the tuple
> insert into cities values (1, 'L
Hi people,
supposing i have the tables :
create table cities (id int, name varchar, primary key(id) );
create table centers (state varchar(2)) inherits (cities);
ant the tuple
insert into cities values (1, 'Lajeado');
How i do if i want to make this city as a center ?
Thanks,
xx===