Constraint to ensure value does NOT exist in another table?

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема Constraint to ensure value does NOT exist in another table?
Дата
Msg-id BANLkTineoT4gKz8vybDQJarVhtxSf-84-g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Constraint to ensure value does NOT exist in another table?  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Constraint to ensure value does NOT exist in another table?  ("Igor Neyman" <ineyman@perceptron.com>)
Re: Constraint to ensure value does NOT exist in another table?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
I know I can setup a FK constraint to make sure Table1.ColA exists in
Table2.Key, however what if I want to do the reverse?

I want to ensure Table1.ColA does NOT exist in Table2.Key..  Can I do
this with any sort of CHECK constraint, trigger, custom function, etc?
 Thanks!

Mike

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

Предыдущее
От: Vikram A
Дата:
Сообщение: Re: PGP encrypt/decrypt - Prereqistes
Следующее
От: Mike Christensen
Дата:
Сообщение: Re: You could be a PostgreSQL Patch Reviewer!