Re: In what type in Oracle it is possible to write down binary <8bit?
Date: Tue, 7 Oct 2008 13:59:19 -0700 (PDT)
Message-ID: <9dc2c53e-1a8f-409b-908c-b937afb418f7@i18g2000prf.googlegroups.com>
On Oct 3, 5:47 am, "gym dot scuba dot kennedy at gmail"
<kenned..._at_verizon.net> wrote:
> <mmf.stave..._at_gmail.com> wrote in message
>
> news:e0ff1b3e-4f77-41dd-b628-4123954f2b47_at_s50g2000hsb.googlegroups.com...> Hello,
>
> > In what type in Oracle it is possible to write down binary <8bit?
>
> > Thanks,
>
> > St. Mr
>
> That would be a raw column or a blob column depending upon size.
> Jim
Actually nothing stops you from inserting nonprintable ascii
characters in a VARCHAR2 column.
[Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
by a C program.]
I have a table badlog with column
last_line VARCHAR2(100);
insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;
SELECT * from badlog;
LAST_LINE
eee<01><05>ddd --- modified to not post binary 01 and 05 in case that
1 row selected.
select rawtohex(last_line) from badlog ; RAWTOHEX(LAST_LINE)
6565650105646464 --- you can see they are real binary values.
1 row selected.
I would not recomend this, but it works. Displaying the result will
depend heavily on your character set.
Ed
Received on Tue Oct 07 2008 - 15:59:19 CDT