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: Case-Sensitivity of Identifier Names

Re: Case-Sensitivity of Identifier Names

From: Piotr Jozwiak <pjozwiak_at_poczta.onet.pl>
Date: Thu, 11 Jul 2002 09:46:52 +0200
Message-ID: <agjdcl$1j4$1@news.onet.pl>


When a query is executed, the Oracle database server converts all database object names to uppercase characters.
Server does not convert to uppercase letters an object name that is enclosed in double quotation marks.

Normally I do not use double quotation marks. However, I have an application designed from Microsoft SQL Server with lots of 'quotation marks constructions' generated automatically by Visual Studio. My application uses ODBC, so it can connect to Oracle server. That's why, I want to find a way to make my example correct, without having to change it.

Piotr Jozwiak

"Jim Lyons" <jlyons_at_weblyons.com> wrote in message news:e67857c9.0207101328.766b8d95_at_posting.google.com...
> "Piotr Jozwiak" <pjozwiak_at_poczta.onet.pl> wrote in message
news:<aghr0p$qo2$1_at_kujawiak.man.lodz.pl>...
> > The names of database objects - tables, views, columns, and synonyms -
are
> > case-sensitive by default in the Oracle database server.
> > How to make them case-insensitive?
> >
> > Example:
> >
> > CREATE TABLE TABLE_NAME ( COLUMN_NAME NUMBER );
> > SELECT "column_name" FROM "table_name";
> >
> > The select does not work because of case-sensitivity of identifier
names.
>
> Lose the double quotes.
>
> Identifiers are case insensitive by default in Oracle. You only need to
be
> concerned with case when dealing with literal strings.
>
> For example:
>
> select table_name from user_tables
>
> is perfectly fine.
>
> select table_name from user_tab_columns where column_name = 'id'
>
> won't get you anything but
>
> select table_name from user_tab_columns where column_name = 'ID'
>
> will.
>
> -----
> Jim Lyons
> DBA
> UT Austin
Received on Thu Jul 11 2002 - 02:46:52 CDT

Original text of this message

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