On Thu, 6 Sep 2001, Carsten H. Pedersen wrote:

> > > `order' is a reserverd word in MySQL.
> > 
> > Too bad the documentation doesn't say so. 
> 
> Yes it does. Read ch. 7.39. It says that you generally cannot
> use reserved names as column names.

Correct, I must have missed that. Sorry. Although I was talking about
table names, not column names.

> > Actually it implies the opposite:
> > 
> > mysql> select order.custid,customer.name,max(payments)
> >        from order,customer
> >        where order.custid = customer.custid
> >        GROUP BY order.custid;
> 
> Here order is used as a table name, not column name.

Yes, I have never talked about order as a column name, only as a
table name. In 7.40 (not 7.39) it says that "most of [these keywords]
are forbidden as column and/or table names". So, the above can't
work, since a table can't be named order. Unless the above expects
you to create the table by qualifying it with the database name ...

Kristoffer Larsson



---------------------------------------------------------------------
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

Reply via email to