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: Null values insertion

Re: Null values insertion

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 26 Oct 1998 13:31:22 GMT
Message-ID: <3635794a.2060783@192.86.155.100>


A copy of this was sent to granaman_at_not_home.com (OraSaurus) (if that email address didn't require changing) On Mon, 26 Oct 1998 05:09:50 GMT, you wrote:

>In article <362f1d08.19766053_at_news.siol.net>, jmodic_at_src.si (Jurij Modic) wrote:
>>On Thu, 22 Oct 1998 11:37:36 +0200, "Itai Gan" <itaig_at_ncc.co.il>
>>wrote:
>>
>>>does anyone know if inserting null numbers into a table create the space in
>>>the disk or not???
>>
>>If the column containing NULLs is the last column in a table
>>definition then no disk space is occupied with those null values. If
>>the column is not the last one then 1 byte per null is occupied.
>
>The short answer is that the length byte(s) for a column will always be used
>even if just to store a zero - for a null column value. (Like he said.)

Just to clarify this -- if the column is NULL and is 'at the end of the table' then it will take NO (zero) bytes to store this column. From the concepts manual:

<quote>

To conserve space, a null in a column only stores the column length (zero). Oracle does not store data for the null column. Also, for trailing null columns, Oracle does not store the column length because the row header signals the start of a new row (for example, the last three columns of a table are null, thus there is no information stored for those columns).

</quote>  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Oct 26 1998 - 07:31:22 CST

Original text of this message

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