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 -> Two tables with same name, one uppercase, one lowercase

Two tables with same name, one uppercase, one lowercase

From: Zar <zar_at_my-dejanews.com>
Date: Tue, 20 Apr 1999 14:37:44 -0500
Message-ID: <371CD788.A0544174@my-dejanews.com>


Hi...

I have recently run across an interesting problem that I need to resolve.
It's not my database, so it's fortunately not really my problem, but it has piqued my curiosity nonetheless.

There are two tables owned by the same schema that have the same name, but one is in uppercase, and one is in lowercase... like so:

SQLWKS> select owner, table_name, tablespace_name,
     2> initial_extent, next_extent pct_increase, num_rows, blocks
     3> from sys.dba_tables
     4> where owner = 'USER1'
     5> and upper(table_name) like 'WEIRD%';
OWNER                          TABLE_NAME
TABLESPACE_NAME                INITIAL_EX PCT_INCREA NUM_ROWS   BLOCKS

------------------------------ ------------------------------
------------------------------ ---------- ---------- ----------
----------
USER1 WEIRDTABLE USERDATA 16384 16384 3 1 USER1 weirdtable USERDATA 57344 57344

2 rows selected.

Upon further investigation, I found the following:

SQLWKS> select * from WEIRDTABLE;
FIELD1 FIELD2
------ ------

Value1 Value1
Value2 Value2
Value3 Value3
3 rows selected.

SQLWKS> select * from weirdtable;
FIELD1 FIELD2
------ ------

Value1 Value1
Value2 Value2
Value3 Value3
3 rows selected.

It looks like whenever I issue a select against it, it's defaulting to the uppercase table.

I take it Oracle's SQL parser automatically converts to uppercase the critical parts of any statement issued.

I expect that it's a phantom value in some hidden system table somewhere.

So, any ideas? should I worry the DBA about it, or is it mostly harmless?

Thanks!
--Zar
Received on Tue Apr 20 1999 - 14:37:44 CDT

Original text of this message

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