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

Home -> Community -> Usenet -> c.d.o.misc -> Re: field types possible with Oracle

Re: field types possible with Oracle

From: <prochak_at_my-dejanews.com>
Date: Wed, 18 Nov 1998 15:27:56 GMT
Message-ID: <72up12$54g$1@nnrp1.dejanews.com>


In article <3656087d.5996971_at_news.pacbell.net>,   RPrell_at_PacBell.Net (Robert Prell) wrote:
> ok, sorry, let me expand. I want to store a true / false into a field
> that I called a bit or binary. I want to take up only one bit of
> space is this possible? Char (1) is not an answer to this question.
> I only want to allow one bit, no larger possible.

Storing one bit isn't possible in most computer systems. You are always going to store at least one byte. If you really are that pressed for disc/memory space, I'd suggest you rethink you application.

OTOH, if space is not the real issue, but the field values are the issue, then use a range CONSTRAINT. With a range constraint you can specify that the field accept, for example, only 'Y' or 'N' and no other values. So while the base type is CHAR(1), the applications can only insert the allowed values.

>
> Memo/text, I want to have a field that contains text that does not
> have a size limit. One time there are 200 characters, another there
> are 20000.

(you mean 2000 here, for VARCHAR2, right?) Others have already pointed out various larger text types. I won't repeat that here.

>
> Intiger, again I want the SQL server to only accept intigers, no other
> numbers are allowed! Is this possible?

Of course it's possible, use types like INTEGER
NUMBER(8) /* numbers of 8 digits */

>
> On Tue, 17 Nov 1998 22:50:35 GMT, RPrell_at_PacBell.Net (Robert Prell)
> wrote:
>
> >Does oracle support field types of;
> >
> >Binary/bit?
> >
> >Memo/text?
> >
> >Intiger?
> >
> >If not what field types do you suggest I use. Also if anyone has a
> >list of allowed field types for Oracle 8.05 or better It would be
> >greatly appreciated!
>
>

you might find it worthwhile to buy the "Oracle 8: The Complete Reference" book. Then read it. It has lots of good stuff for beginners. In particular, it has the data types listed and defined.

(The syntax diagrams in the back are terrible,  but you can't have everything.)

 have a good day.

--
Ed Prochak
Magic Interface, Ltd.
440-498-3702

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Nov 18 1998 - 09:27:56 CST

Original text of this message

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