Re: referential integrity on existing table

Поиск
Список
Период
Сортировка
От Patrick Welche
Тема Re: referential integrity on existing table
Дата
Msg-id 20011210205702.G2303@quartz.newn.cam.ac.uk
обсуждение исходный текст
Ответ на referential integrity on existing table  ("Adam Fisher" <black@cia.com.au>)
Список pgsql-general
On Fri, Dec 07, 2001 at 11:00:22AM +1100, Adam Fisher wrote:
> My question is, is it possible to create a referential integrity constraint
> on an exisiting, already populated, table??

Yes, cf:

ALTER TABLE table
    ADD table constraint definition

eg:

alter table "tblAddress"
  add constraint addfk
  foreign key("PersonID") references "tblPerson"("ID") match full;

Cheers,

Patrick

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

Предыдущее
От: Andrew Gould
Дата:
Сообщение: Re: Access and Boolean
Следующее
От: Chris Albertson
Дата:
Сообщение: Need SQL help, I'm stuck.