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
On Mon, Jun 09, 2003 at 09:53:12PM -0400, Becoming Digital wrote:
SELECT item_name AS name, item_desc AS desc FROM food;
'desc' is a reserved word.
Try:
SELECT item_name AS name, item_desc AS `desc` FROM food;
Jim Winstead
MySQL AB
--
MySQL General Mailing List
For list archives:
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
Jim was faster ;-), ..but I am getting there.
Best regards
Nils Valentin
Tokyo/Japan
2003 6 10 11:18Jim Winstead :
On Mon, Jun 09, 2003 at 09:53:12PM -0400, Becoming Digital wrote:
SELECT item_name AS name, item_desc AS desc FROM food;
'desc' is a reserved word.
Try:
SELECT
Subject: Re: Trouble with SELECT AS syntax
On Mon, Jun 09, 2003 at 09:53:12PM -0400, Becoming Digital wrote:
SELECT item_name AS name, item_desc AS desc FROM food;
'desc' is a reserved word.
Try:
SELECT item_name AS name, item_desc AS `desc` FROM food;
Jim Winstead
MySQL AB
--
MySQL General
I posted a page containing the reserved words at
http://www.knowd.co.jp/staff/nils/
In case it is of any help for somebody.
Best regards
Nils Valentin
Tokyo/Japan
2003 6 10 11:18Jim Winstead :
On Mon, Jun 09, 2003 at 09:53:12PM -0400, Becoming Digital wrote:
SELECT item_name AS name,