dropping constraints
dropping constraints
От:
Linh Luong <linh.luong@computalog.com>
Дата:
Hi, Is there to drop a constraint when you add it separately with an alter statement. alter table failuretypecategory1 add constraint fk_failuretypecategory1 FOREIGN KEY (failurecategory1id) REFERENCES failurecategory1 (id) ON UPDATE CASCADE ON DELETE CASCADE; I tried drop trigger on failurecategory1 and drop trigger on failuretypecategory1 and also drop trigger on failurecategory1 and drop trigger on failuretypecategory1 But it kept saying ERROR: DropTrigger: there is no trigger / on relation failuretypecategory1 What am I doing wrong. I tried dropping the table also and when I tried to delete from a table that it referenced above it gave the error that the table I just drop doesn't exist. Obviously because I just removed it but the constraint it still there.. Thanks -- Linh Luong
Re: dropping constraints
От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:
You probably need to make sure to double quote the tgname in your drops. On Thu, 7 Jun 2001, Linh Luong wrote: > Hi, > > Is there to drop a constraint when you add it separately with an alter > statement. > > alter table failuretypecategory1 add constraint fk_failuretypecategory1 > FOREIGN KEY (failurecategory1id) > REFERENCES failurecategory1 (id) ON UPDATE CASCADE ON DELETE CASCADE; > > I tried > drop trigger on failurecategory1 > and > drop trigger on failuretypecategory1 > > and also > > drop trigger on failurecategory1 > and > drop trigger on failuretypecategory1 > > > But it kept saying > ERROR: DropTrigger: there is no trigger / on > relation failuretypecategory1 > > What am I doing wrong. > > I tried dropping the table also and when I tried to delete from a table > that it referenced above it gave the error that the table I just drop > doesn't exist. Obviously because I just removed it but the constraint > it still there..