add a constraint to specify NOT NULL values - Mailing list pgsql-general

From javier garcia - CEBAS
Subject add a constraint to specify NOT NULL values
Date
Msg-id 200305201336.h4KDakI29909@natura.cebas.csic.es
Whole thread Raw
Responses Re: add a constraint to specify NOT NULL values  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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

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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Executing External Programs
Next
From: greg@turnstep.com
Date:
Subject: Re: Executing External Programs