Qualify the column names. EG

SELECT categories.ID, products.Item
FROM products
JOIN categories ON categories.ID = products.Category
LIMIT 0 , 30;

Regards

John Daisley



> Hi;
> I get the following error:
>
> *SQL query:*
>
> SELECT ID, Item
> FROM products
> JOIN categories ON categories.ID = products.Category
> LIMIT 0 , 30;
>
>  *MySQL said:*
>  #1052 - Column 'ID' in field list is ambiguous
>
> Please note the error is about ambiguity. "products" has an ID field and
> so
> does "categories". If I run the statement taking out the "ID" from the
> select, it runs. So, where is the ambiguity??
> TIA,
> V
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to