Re: Setting up Field constraints - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Setting up Field constraints
Date
Msg-id 20020306161806.L18770-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Setting up Field constraints  (Joseph Maxwell <jemaxwell@jaymax.com>)
List pgsql-general
On Wed, 6 Mar 2002, Joseph Maxwell wrote:

> Hello,
> I have created a DB and TABLE but would like to constrain one field to
> accept either "YES" or "NO" only. How can I set this up?

Probably something like:
Prior_Rx varchar(3) CHECK (Prior_Rx in ('Yes','No'))



pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: Have problems with 7.1 -> 7.2 upgrade
Next
From: andrew.clark@sge.net
Date:
Subject: Re: Have problems with 7.1 -> 7.2 upgrade