how to use column name with Case-sensitive with out usig ""

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use column name with Case-sensitive with out usig ""

wisan watcharinporn
how can i use

create table myName(
   myColumnName varchar(32)
);

select myColumnName from myColumnName ;

instead

create table "myName" (
   "myColumnName" varchar(32)
);

select "myColumnName" from "myColumnName" ;

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: [SQL] how to use column name with Case-sensitive with out usig

Ragnar Hafstað
On Sat, 2005-08-06 at 05:00 +0000, wisan watcharinporn wrote:
> how can i use
>
> create table myName(
>    myColumnName varchar(32)
> );
>
> select myColumnName from myColumnName ;

Assuming you meant 'from myName' here,
this should work.

On the other hand, this will NOT work:

  create table "myName"(
     myColumnName varchar(32)
  );
  select myColumnName from myName ;


if you mean that you want some thing like:
  create table foo (
    myColumnName varchar(32),
    MYcOLUMNnAME varchar(32)
  );
without using quotes, then that is not
possible, per SQL specs.

gnari



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match