From: juman <juman@spray.se>
To: pgsql-sql@postgresql.org
Subject: Verificate values in other table?
Date: Sun, 14 Nov 1999 11:25:29 +0100
Message-ID: <000b01bf2e8a$943f3c80$64010a0a@vodka.booze.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: juman@spray.se
Subject: Re: Verificate values in other table?
In-Reply-To: <000b01bf2e8a$943f3c80$64010a0a@vodka.booze.com>
References: <000b01bf2e8a$943f3c80$64010a0a@vodka.booze.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox