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 -> NULL or 0 for a "FLAG_COLUMN"

NULL or 0 for a "FLAG_COLUMN"

From: Martin T. <bilbothebagginsbab5_at_freenet.de>
Date: 6 Sep 2006 07:55:38 -0700
Message-ID: <1157554538.731786.241550@i42g2000cwa.googlegroups.com>


Hey all.

>From a general ORACLE point of view (lets say 9i2 upwards), what would
be the preferred way of storing a true/false flag column.

  1. col MY_FLAG: NOT NULL, DEFAULT 0, Possible values: 1, 0 or
  2. col MY_FLAG: Possible values 1, NULL

There is some side effect of having NULL vs. 0 when using indexes, right?
Any other ideas why the one or other might be better (Storage / Performance / Indexing)?

thanks!

best,
Martin Received on Wed Sep 06 2006 - 09:55:38 CDT

Original text of this message

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