Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 255FE475FE4 for ; Tue, 14 May 2002 17:47:52 -0400 (EDT) Received: from mail3.panix.com (mail3.panix.com [166.84.1.74]) by postgresql.org (Postfix) with ESMTP id B3B4D476BD3 for ; Tue, 14 May 2002 16:46:22 -0400 (EDT) Received: from mailhost.nrnet.org (unknown [166.84.192.39]) by mail3.panix.com (Postfix) with ESMTP id 40C3B9822C for ; Tue, 14 May 2002 16:46:23 -0400 (EDT) Received: from sqlclinic.net (uucp@localhost) by mailhost.nrnet.org (8.11.4/8.11.4) with UUCP id g4EKWCh00641 for pgsql-sql@postgreSQL.org; Tue, 14 May 2002 16:32:12 -0400 Received: from localhost (tomg@localhost) by admin.nrnet.org (8.9.1/8.9.1) with ESMTP id QAA13158 for ; Tue, 14 May 2002 16:50:20 -0400 X-Authentication-Warning: admin.nrnet.org: tomg owned process doing -bs Date: Tue, 14 May 2002 16:50:20 -0400 (EDT) From: Thomas Good X-Sender: tomg@admin.nrnet.org To: PostgreSQL SQL List Subject: CHECK CONSTRAINT blunder(s) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200205/151 X-Sequence-Number: 7787 Hi, Can someone clue me in as to proper syntax for adding a not null check constraint? I've fumbled around a bit without much luck and I don't see this covered in the alter table section of the interactive docs. My pseudo code is: ALTER TABLE doof ADD CONSTRAINT bleibt_doof NOT NULL (record_id); But obviously this fails. TIA - Cheers ----------------------------------------------------------------------- Thomas Good e-mail: tomg@sqlclinic.net Programmer/Analyst phone: (+1) 718.818.5528 Residential Services fax: (+1) 718.818.5056 Behavioral Health Services, SVCMC-NY mobile: (+1) 917.282.7359 -- -- SQL Clinic - An Open Source Clinical Record www.sqlclinic.net ------------------------------------------------------------------------