List:General Discussion« Previous MessageNext Message »
From:Johan Höök Date:October 7 2005 8:01am
Subject:Re: Duplicate column error when creating view on 5.0.13
View as plain text  
Hi Terence,

I think your problem lies in your SELECT *
If you look at the columnheaders below you get category_id twice.
I guess you have to specify your columns with aliases.

/Johan
> 
> SELECT * FROM ticket_master tm, category_master cm
> WHERE tm.category_id = cm.category_id;
> +-----------+-------------+-------------+---------------+
> | ticket_id | category_id | category_id | category_name |
> +-----------+-------------+-------------+---------------+
> |         1 |           1 |           1 | test          |
> +-----------+-------------+-------------+---------------+
> 1 row in set
> 
> Thanks
> 

Thread
Duplicate column error when creating view on 5.0.13Terence7 Oct
  • Re: Duplicate column error when creating view on 5.0.13Johan Höök7 Oct
    • Re: Duplicate column error when creating view on 5.0.13Terence7 Oct
      • Re: Duplicate column error when creating view on 5.0.13Johan Höök7 Oct
  • Re: Duplicate column error when creating view on 5.0.13Martijn Tonies7 Oct
  • Re: Duplicate column error when creating view on 5.0.13SGreen7 Oct
    • Re: Duplicate column error when creating view on 5.0.13Terence10 Oct