Guest_imported
New member
- Jan 1, 1970
- 0
create table a(id int not null,
aname varchar(10),
constraint pk_a primary key (id));
create table b(id int, bname varchar(10),
constrain fk_b foreign key (id) references a (id));
create table c(id int, cname varchar(10),
constrain fk_c foreign key (id) references a (id));
commit;
======================
-- sql 1
drop table b;
drop table c;
commit;
/*is ok*/
=====================
-- sql 2
drop table b;
commit;
/*is ok*/
drop table c;
/*is error with message 'table c is in use'*/
========================
if there is not foreign constrain, everything is right.
i don't know why? maybe is a bug in interbase.
aname varchar(10),
constraint pk_a primary key (id));
create table b(id int, bname varchar(10),
constrain fk_b foreign key (id) references a (id));
create table c(id int, cname varchar(10),
constrain fk_c foreign key (id) references a (id));
commit;
======================
-- sql 1
drop table b;
drop table c;
commit;
/*is ok*/
=====================
-- sql 2
drop table b;
commit;
/*is ok*/
drop table c;
/*is error with message 'table c is in use'*/
========================
if there is not foreign constrain, everything is right.
i don't know why? maybe is a bug in interbase.