Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: char(1) VS varchar2(1)
Hi!
> Trailing columns with NULL values do not occupy any space, not even a
length
> byte.
Yep, I missed this one. Also, when few trailing null columns aren't stored in a row, this particular rows column count is smaller as well, so the column count in physical table storage can vary...
> Non-trailing columns with NULL values have a constant value of 0xFF (255)
in
> the length byte consuming just the one byte.
Yep, and this means that even fixed-length CHAR datatypes don't consume any space except length byte if they contain nulls. I once saw a recommendation to store your data in char columns if you don't want to have to worry about row size changes and PCTFREE setting... which is mostly a stupid suggestion anyway and doesn't work in case of nulls either.
Tanel.
P.S. Tim, I assume that we'll meet at RMOUG training days this Feb?
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Tanel Poder INET: tanel.poder.003_at_mail.ee Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Nov 03 2003 - 03:59:28 CST
![]() |
![]() |