Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Elliot
On 2013-11-04 14:44, Jason Long wrote: CREATE TABLE t_a ( id bigint NOT NULL, CONSTRAINT pk_a PRIMARY KEY (id) ); CREATE TABLE t_b ( id bigint NOT NULL, CONSTRAINT pk_b PRIMARY KEY (id), CONSTRAINT fk_b_a FOREIGN KEY (id) REFERENCES t_a (id) ON DELETE CASCADE ); INSERT INTO t_a

Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Adrian Klaver
On 11/04/2013 11:44 AM, Jason Long wrote: I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds recor

Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Adrian Klaver
On 11/04/2013 11:44 AM, Jason Long wrote: I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds recor

[GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Jason Long
I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds records from several other tables. I added a simp