Hi Edward,

I am not sure which version and OS you are using. I tried it on Suse Linux 8.1 
and  MySQL 4.1 alpha. I get the same error. It seems that there is a problem 
with this part 

"item_desc AS desc "

AS a test I modified the definiton of item_desc to the same as the column 
item_name, but no avail.

 ALTER TABLE food MODIFY  item_desc char(50) NOT NULL default'';

As I am using 4.1 alpha I am unable to say its a bug or not yet imlemented ;-) 
,
---

Aaaaah,  I got it .

"desc" must be a reserved word. .. and BINGO thats it.!!
use  "item_desc AS xx"
 
but no reserved words please ;-)

Best regards

Nils Valentin
Tokyo/Japan


2003年 6月 10日 火曜日 10:53、Becoming Digital さんは書きました:
> Despite my review of the manual, I cannot get my SELECT AS statements to
> work. Every attempt returns Error 1064.  My statements, which appear to be
> in accordance with the manual (http://www.mysql.com/doc/en/SELECT.html),
> are formed as below.  I have included my with my CREATE TABLE record for
> reference.
>
> SELECT item_name AS name, item_desc AS desc FROM food;
>
> SHOW CREATE TABLE food;
>
> | food  | CREATE TABLE `food` (
>
>   `item_id` tinyint(3) unsigned NOT NULL auto_increment,
>   `cat_id` tinyint(3) unsigned NOT NULL default '0',
>   `item_name` char(50) NOT NULL default '',
>   `item_desc` char(255) NOT NULL default '',
>   `item_price` decimal(5,2) NOT NULL default '0.00',
>   PRIMARY KEY  (`item_id`),
>   KEY `idx_cat` (`cat_id`)
> ) TYPE=MyISAM |
>
>
> If I'm overlooking something simple, I apologize, but this just isn't
> working for me.  Thanks a lot.
>
> Edward Dudlik
> Becoming Digital
> www.becomingdigital.com

-- 
================================================
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
================================================


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to