Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: data type question

Re: data type question

From: <timcuth_at_bellsouth.net>
Date: Mon, 26 Jul 1999 23:05:22 GMT
Message-ID: <SQ5n3.1237$i5.11045@news4.mia>


"Finnegan Calabro" <fcalabro_at_aisvt.bfg.com> :

> Can you specify a list of strings as the only possible values for a
database
> (ie as opposed to simply integer or varchar, can there be only a small
> number of accepted values)? thanks very much
> finn
>
>

There are two relatively easy ways to do this:

  1. Place a check constraint on the column which allows only the specific values you want.
  2. Create another table containing rows with the values you want, then create a foreign key relationship. The new table would be the parent and the table you're trying to restrict would be the child.

Tim Received on Mon Jul 26 1999 - 18:05:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US