Re: Case sensitivity in Mysql

2002-03-14 Thread BD

At 11:17 AM 3/14/2002, you wrote:
>On Thursday 14 March 2002 9:32 am, BD wrote:
> >
> > Why or why couldn't MySQL have used case insensitive names in the first
> > place? Store everything in lower case internally, but allow the user to use
> > "Invoice_Number" or "invoice_number" or "INVOICE_NUMBER" in the SQL
> > statement and it should refer to the same column. Same with table names. I
> > don't see why you would want to have 3 different columns in the same table
> > with names "Invoice_Number", "invoice_number" and "INVOICE_NUMBER". Maybe
> > it's just me, but it doesn't make a lot of sense to have case insensitive
> > names. It just leads to typos and the code doesn't run. :-(
>
>In SQL92, identifiers can only be uppercase letters and numerals.  Therefore,
>if you are using lowercase, you are NOT writing valid SQL92.  Most databases
>will allow this, of course.  SQL99 adds support for lowercase characters but
>MySQL doesn't claim to implement SQL99 yet.

I don't mind switching to uppercase entities if it means I won't have to be 
on the lookout for the SQL police. The next knock on the door could be SQL 
police coming to confiscate my database or levy heavy fines. :-)  (Don't 
laugh. I don't know if you know this or not, but in Quebec there are 
language laws preventing store owners from having English only signs or 
signs where the English text is larger than the French text.  The English 
text must be smaller than the French text otherwise the language "police" 
will come knocking on your door and will force you to take the sign down or 
fine you. The people who refuse end up in court.  I hope the ANSI standards 
committee isn't listening because I could be in big trouble!)

Seriously though, you're right, the table and column names should be in 
uppercase. It is strange though the MySQL related books I've read have kept 
table and column names to lower case, maybe because they're easier to read. 
(Hey, maybe I'll blame this on Paul.) I only wish MySQL could have the 
case insensitive names. I see no point in having case sensitive table and 
column names.

Brent

(Oops.. I've got to go. There is someone knocking on the door...)


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Case sensitivity in Mysql

2002-03-14 Thread Christopher Thompson

On Thursday 14 March 2002 9:32 am, BD wrote:
>
> Why or why couldn't MySQL have used case insensitive names in the first
> place? Store everything in lower case internally, but allow the user to use
> "Invoice_Number" or "invoice_number" or "INVOICE_NUMBER" in the SQL
> statement and it should refer to the same column. Same with table names. I
> don't see why you would want to have 3 different columns in the same table
> with names "Invoice_Number", "invoice_number" and "INVOICE_NUMBER". Maybe
> it's just me, but it doesn't make a lot of sense to have case insensitive
> names. It just leads to typos and the code doesn't run. :-(

In SQL92, identifiers can only be uppercase letters and numerals.  Therefore, 
if you are using lowercase, you are NOT writing valid SQL92.  Most databases 
will allow this, of course.  SQL99 adds support for lowercase characters but 
MySQL doesn't claim to implement SQL99 yet.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Case sensitivity in Mysql

2002-03-14 Thread BD

At 02:05 AM 3/14/2002, you wrote:
>Hi,
>I run mysql on windows as well as linux.
>table creation and access right are given  by  java program.
>
>Problem im facing is.,
>i create a table with name TEMP
>in windows in creates table with name "temp" and linux "TEMP"
>while giving rights thru GRANTstatement , it fails in windows cause it
>expect "TEMP" not  "temp"
>
>How can i create  table name with upper case  in Windows
>
>create table TEMP ( x varchar(6),  y varchar(6))
>this creates  a table with name temp..not TEMP
>
>
>help me with mysql

Anis,
 Talking from experience, it is best to create all database names 
and table names in lower case. It will prevent a lot of grey hairs in the 
future.
 You can have upper and lower case column names, but I also put 
them in lower case to avoid mistyping the case of a letter. If you keep 
everything in lowercase, life will be much easier.

Brent

Why or why couldn't MySQL have used case insensitive names in the first 
place? Store everything in lower case internally, but allow the user to use 
"Invoice_Number" or "invoice_number" or "INVOICE_NUMBER" in the SQL 
statement and it should refer to the same column. Same with table names. I 
don't see why you would want to have 3 different columns in the same table 
with names "Invoice_Number", "invoice_number" and "INVOICE_NUMBER". Maybe 
it's just me, but it doesn't make a lot of sense to have case insensitive 
names. It just leads to typos and the code doesn't run. :-(


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Case sensitivity in Mysql

2002-03-13 Thread Ahmed S K Anis

Hi,
I run mysql on windows as well as linux.
table creation and access right are given  by  java program.

Problem im facing is.,
i create a table with name TEMP
in windows in creates table with name "temp" and linux "TEMP"
while giving rights thru GRANTstatement , it fails in windows cause it
expect "TEMP" not  "temp"

How can i create  table name with upper case  in Windows

create table TEMP ( x varchar(6),  y varchar(6))
this creates  a table with name temp..not TEMP


help me with mysql

reagrds,
Anis




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Case Sensitivity in MySQL

2001-12-26 Thread SankaraNarayanan Mahadevan

Hi,

I have a situation as follows:

There is a table that stores the user name.
One user name is 'David' and another is 'david'
I want to select only the user with the name
'david'(all small and not 'David')

MySQL is case insensitive in selecting records...
how to make it case-sensitive in selecting records...

shankar 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php