What is command for supporting foreign key in Firebird?

Questions by timmy   answers by timmy

Showing Answers 1 - 3 of 3 Answers

mdk69

  • Jun 26th, 2007
 

Lets do it by example:

create table Master_A( mst_1 integer not null primary key,
  mst_2 varchar(10));

create table slave_of_a(slv_1 integer not null, primary key,
  mst_1 integer);

alter table slave_of_a add constraint FK_2_MST foreign key (mst_1) references Master_A(mst_1);

Is the same command that sql92 supports.

alter table table_name add constraint constraint_name foreign key (field1,field2,...) references
master_table(field1,field2...,);

hth

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions