-- RI inherits right ?
-- no ! A has primary key, A1 doesnt
-- but A1 should have all columns of A
-- and I assumed properties on them
-- apparently 2 stage drop is needed
-- drop derived 1st, then base
drop table A1;
drop table A;
create table A ( -- common elements,
name varchar(20) not null, -- key field
primary key ( name )
);
create table A1 (
-- name,
rank text
-- primary key ( name ) -- err if uncommented
) inherits ( A );
insert into A values ('yo');
insert into A values ('hey');
-- insert into a values ('hey'); -- disallowed
select * from A;
insert into A1 values ('yo');
insert into A1 values ('hey');
insert into A1 values ('hey'); -- allowed
select * from A1;
-- seems last should be disallowed