Received: from relay01.cablecom.net (relay01.cablecom.net [62.2.33.101]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1E82hx02154 for ; Wed, 14 Feb 2001 03:02:43 -0500 (EST) (envelope-from olaf.zanger@soli-con.com) Received: from mail.swissonline.ch (mail.swissonline.ch [62.2.32.83]) by relay01.cablecom.net (8.11.1/8.11.0/SOL/MXRELAY-1.03) with ESMTP id f1E82fm55166 for ; Wed, 14 Feb 2001 09:02:41 +0100 (CET) Received: from sino (dclient164-21.hispeed.ch [62.2.164.21]) by mail.swissonline.ch (8.11.1/8.11.0/MSOL-2.17) with SMTP id f1E82ee19706 for ; Wed, 14 Feb 2001 09:02:40 +0100 (MET) Content-Type: text/plain; charset="iso-8859-1" From: Olaf Marc Zanger Reply-To: olaf.zanger@soli-con.com Organization: soli-con Engineering Zanger To: PgSQL-SQL Date: Wed, 14 Feb 2001 09:02:54 +0100 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01021409023603.01358@sino> Content-Transfer-Encoding: 8bit Subject: constraint/restrict X-Archive-Number: 200102/251 X-Sequence-Number: 1442 hi there, with two tables i want to make some constraint-restrictions create table address ( id serial, country_id int4, ....); and create table country (id serial, ...); to make sure that now country-row is deleted if there is still a country_id in address table. e.g. address: 1, 2, ... country: 2, ... now country wouldn't be allowed to be deleted. how to do that? thanks fo help olaf -- soli-con Engineering Zanger, Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23, 3013 Bern / Switzerland fon:+41-31-332 9782, mob:+41-76-572 9782 mailto:olaf.zanger@soli-con.com, http://www.soli-con.com