Re: Mechanics of Update:Cascade

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Mechanics of Update:Cascade
Дата
Msg-id 200401311742.00784.dev@archonet.com
обсуждение исходный текст
Ответ на Mechanics of Update:Cascade  (beyaRecords - The home Urban music <uzo@beya-records.com>)
Список pgsql-sql
On Saturday 31 January 2004 10:50, beyaRecords - The home Urban music wrote:
> Hi,
> could someone please explain to me the mechanics of an UpDate:Cascade?
> Delete:Cascade I fully understand but not Update. I have 2 tables A and
> B. On B I have created a foreign key on user_id in both B and A for
> Update and Delete cascade. If I delete from A it deletes all from B. If
> I update A what happens in B?

The column should be changed there too. For example, if we have
B.user_id => A.user_id and change A.user_id from 100 to 200 then the same 
should happen in B too.

--  Richard Huxton Archonet Ltd


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Mechanics of Update:Cascade
Следующее
От: "Enio Schutt Junior"
Дата:
Сообщение: Sometimes referential integrity seems not to work