Re: [SQL] Correct Syntax for alter table ..add constraint

2001-01-19 Thread Najm Hashmi
Josh Berkus wrote: > Najm, > > > references age_list(id); > > And I get the following error: > > flipr=# alter table users > > flipr-# add constraint age_fk foreign key(age) references > > age_list(id); > > NOTICE: ALTER TABLE ... ADD CONSTRAINT will create > > implicit trigger(s) > > for FOREIG

Re: [SQL] Correct Syntax for alter table ..add constraint

2001-01-19 Thread Josh Berkus
Najm, > references age_list(id); > And I get the following error: > flipr=# alter table users > flipr-# add constraint age_fk foreign key(age) references > age_list(id); > NOTICE: ALTER TABLE ... ADD CONSTRAINT will create > implicit trigger(s) > for FOREIGN KEY check(s) > ERROR: referential i

[SQL] Correct Syntax for alter table ..add constraint

2001-01-19 Thread Najm Hashmi
Hi All, What is the correct syntax for adding a foreign key constraint from the command line. I am using v7.1 beta3. I am doing the follwoing: alter table users add constraint age_fk foreign key(age) references age_list(id); And I get th