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: NULLS when col is NOT NULL ??

Re: NULLS when col is NOT NULL ??

From: Joel Garry <joel-garry_at_home.com>
Date: 25 Aug 2004 15:15:50 -0700
Message-ID: <91884734.0408251415.8f85ec6@posting.google.com>


Ed Stevens <nospam_at_noway.nohow> wrote in message news:<6l2pi0pfsptulfkmdo2t48vn9bqt153mqi_at_4ax.com>...
> On Tue, 24 Aug 2004 14:21:00 -0500, Ed Stevens <nospam_at_noway.nohow>
> wrote:
>
>
> So . . . to further clarify my understanding, given a column defined
> as CHAR(8) (fixed length, not VARCHAR -- and nulls allowed), if x'00'
> is not a 'representation' of nulls, what is physically stored in the 8
> bytes reserved for that column?

This ought to be even more confusing, as it appears '' and null are both octal 377 followed by a newline:

SQL> create tablespace jjj datafile '/home2/oracle/jjj.dbf' size 10K;

Tablespace created.
[then appropriate stuff for default ts and so forth, then connect as user]

  1 create table jjj (a char(10), b char(10), c char(10))   2* storage (initial 1K next 1K)
SQL> / Table created.

SQL> insert into jjj values ('aaaaaaaaaa','','bbbbbbbbbb');

1 row created.

SQL> insert into jjj values ('aaaaaaaaaa',null,'cccccccccc');

1 row created.

SQL> commit;

Commit complete.

SQL> connect / as sysdba
Connected.
SQL> alter system checkpoint;

System altered.

SQL> !od -c jjj.dbf|grep "a a"
0077700 \0 \0 \0 \0 \0 \0 \0 \0 , 001 003 \n a a a a
0077720 a a a a a a 377 \n c c c c c c c c
0077740 c c , 001 003 \n a a a a a a a a a a

SQL> !od -c jjj.dbf|grep "b b"
0077760 377 \n b b b b b b b b b b 357 , 006 001

SQL> Note also the usual relational lack of physical row ordering.

jg

--
@home.com is bogus.
What we really need is virus _author_ throttling. 
http://story.news.yahoo.com/news?tmpl=story&cid=1093&e=6&u=/pcworld/20040824/tc_pcworld/117531
Received on Wed Aug 25 2004 - 17:15:50 CDT

Original text of this message

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