Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1881B476107 for ; Tue, 7 Jan 2003 10:07:24 -0500 (EST) Received: from web20802.mail.yahoo.com (web20802.mail.yahoo.com [216.136.226.191]) by postgresql.org (Postfix) with SMTP id 97487476094 for ; Tue, 7 Jan 2003 10:07:22 -0500 (EST) Message-ID: <20030107150726.8955.qmail@web20802.mail.yahoo.com> Received: from [208.13.35.65] by web20802.mail.yahoo.com via HTTP; Tue, 07 Jan 2003 07:07:26 PST Date: Tue, 7 Jan 2003 07:07:26 -0800 (PST) From: Jeff Eckermann Subject: Re: A problem about alter table To: jack , pgsql-sql@postgresql.org In-Reply-To: <001601c2b64b$ba8c3b30$1400a8c0@jac> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/64 X-Sequence-Number: 10929 --- jack wrote: > Hi, all > I'm using postgreSQL 7.2.3. The following statement > always cuases a parser > error, "parse error at or near NOT". Please adivse, > thank you in advance. > > ALTER TABLE _acct_group1 > ALTER groupkey SET NOT NULL; I believe you will need to use: ALTER TABLE _acct_group1 ADD CONSTRAINT CHECK groupkey NOT NULL; I haven't checked that syntax for correctness, but it's covered in the docs on ALTER TABLE. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com