Can i force deletion of dependent rows?

Поиск
Список
Период
Сортировка
От Shruthi A
Тема Can i force deletion of dependent rows?
Дата
Msg-id 6caee9521002122211q7e4fd2fcj1a0489fd64dc204a@mail.gmail.com
обсуждение исходный текст
Список pgsql-sql
<br /><div class="gmail_quote">Hello,<br /><br />I have 2 tables (A and B) where the table B has a foreign key
referenceto table A.   Like this:<br /><br />create table A (x int primary key);<br />create table B (y int primary
key,z int references A (x) );<br /><br /> As you can see, i've not specified any further 'on delete' clause to the
foreignkey constraint like 'on delete cascade' or 'on delete restrict' or 'on delete set null' or 'on delete set
default'.  This means that the default behavior is followed ie 'on delete restrict' holds by default.<br /><br />Now I
wantto delete a particular row from table A.  Is there any way I can force deletion of all the dependent rows in table
B? <br /><br />Note that the tables have already been created in the above manner and populated.  I want to do this
deletionthrough DML only ie without any change in the table definition.<br /><br />Thanks,<br /><font
color="#888888">Shruthi<br/><br /></font></div> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Tim Landscheidt
Дата:
Сообщение: Re: complex join question
Следующее
От: Tim Landscheidt
Дата:
Сообщение: Re: Can i force deletion of dependent rows?