add a constraint to specify NOT NULL values

From: javier garcia - CEBAS <rn001(at)cebas(dot)csic(dot)es>
To: pgsql-general(at)postgresql(dot)org
Subject: add a constraint to specify NOT NULL values
Date: 2003-05-20 13:49:01
Message-ID: 200305201336.h4KDakI29909@natura.cebas.csic.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all;

How could I add a constraint to specify that a column can't be null? I've
tried a lot of sintaxis of the style of:

(the table is "pluviometria", and the column is "year")

ALTER TABLE pluviometria ALTER year CONSTRAINT NOT NULL;
ALTER TABLE pluviometria.year CONSTRAINT NOT NULL;
ALTER pluviometria.year ADD CONSTRAINT NOT NULL;
ALTER TABLE pluviometria ALTER COLUMN cod_variable SET NOT NULL;
...
but none works.

Best wishes

Javier

-------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message greg 2003-05-20 13:52:27 Re: Executing External Programs
Previous Message Jan Wieck 2003-05-20 13:42:45 Re: Executing External Programs