Verificate values in other table?

Поиск
Список
Период
Сортировка
От juman
Тема Verificate values in other table?
Дата
Msg-id 000b01bf2e8a$943f3c80$64010a0a@vodka.booze.com
обсуждение исходный текст
Ответы Re: [SQL] Verificate values in other table?
Re: [SQL] Verificate values in other table?
Список pgsql-sql
I'm working on a little database and got stuck with the following problem. I
have two tables that look like this

table1 ( ids char(4) )
table2 ( id char(4), comment text)

What I want to do is that if someone adds or updates a row in in table2 I
want to verify that the <id> given exists in table1. And if it doesn't don't
accept the modification and give the user a error message. Is there some way
to do this?

/ Fredrik



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

Предыдущее
От: "Artur Kokoszka"
Дата:
Сообщение: national characters in plpgsql
Следующее
От: Chaotic Inceptions
Дата:
Сообщение: Arrays of composites, bug or usage?