Re: How to use the SET data type? Help plz!

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: pgadmin(at)claymccoy(dot)com
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: How to use the SET data type? Help plz!
Date: 2003-10-27 15:29:50
Message-ID: 3F9D39EE.80603@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> I see your points. So how is the best way to implement this type of "set" idea
> in something like postgres? Say I have a column named primary colors, and I
> want to limit this to red, blue, and yellow. How is the best way to do this
> without a mysql set?

CREATE TABLE foo (
color varchar(255) NOT NULL,
CHECK (color IN ('red', 'blue', 'yellow'))
};

Chris

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Albin Blaschka 2003-10-28 10:06:29 DBMigration-Wizard & Access 2002
Previous Message pgadmin 2003-10-27 15:16:06 Re:  How to use the SET data type?  Help plz!