Message-Id: <10650.119270@fatcity.com> From: Rahul Date: Mon, 16 Oct 2000 12:46:30 +0700 Subject: RE: Strange workings of Oracle Shreepad, found this line in the view text for dba_tables... lpad(decode(bitand(t.flags, 8), 8, 'Y', 'N'),5), why use LPAD ?? and why not use YES AND NO if the columns is varchar2(5) ?? rahul > ---------- > From: Shreepad Vaidya[SMTP:Shreepad.Vaidya@alltel.com] > Reply To: ORACLE-L@fatcity.com > Sent: Monday, October 16, 2000 1:05 PM > To: Multiple recipients of list ORACLE-L > Subject: Strange workings of Oracle > > > > Hi everyone, > > I noticed something very strange when i tried to cache a table. > > 1) I cached a table > alter table emp cache; > 2) Did a describe on dba_tables > One of the columns is : > CACHE VARCHAR2(5) > 3) SQL> select distinct cache from dba_tables ; > > CACHE > ----- > N > Y > 4)SQL> select table_name,cache from dba_tables where cache='Y' ; > > no rows selected > > 5)select table_name,cache from dba_tables where cache like '%Y%'; > TABLE_NAME CACHE > ------------------------------ ----- > EMP Y > > 6) SQL> select table_name,cache from > dba_tables where cache=' Y'; > > TABLE_NAME CACHE > ------------------------------ ----- > EMP Y > > Gave 4 spaces before y > > > > > If the column is varchar2 shouldn't it put only Y rather than > prefixing it with spaces. > > Even for Datatype char , space are postfixed . > > I found this on Oracle 7.3.4 and Oracle 8.1.5 > > > Thanks > shreepad. > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Shreepad Vaidya > INET: Shreepad.Vaidya@alltel.com > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California -- Public Internet access / Mailing Lists > -------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: ListGuru@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).