Hi All,

I get a duplicate column error on 5.0.13 when creating a view. Am I doing something wrong here or do I submit a bug report? This should be allowed as the col names
are not duplicated.

Reproduce:

create table `ticket_master` (
`ticket_id` int (5) NOT NULL AUTO_INCREMENT ,
`category_id` int (5) NULL,
PRIMARY KEY ( `ticket_id` ));

create table `category_master` (
`category_id` int (5) NOT NULL AUTO_INCREMENT ,
`category_name` varchar (20) NULL,
PRIMARY KEY ( `ticket_id` ));

CREATE VIEW `v_tickets` AS
(
SELECT * FROM ticket_master tm, category_master cm
WHERE tm.category_id = cm.category_id
);

ERROR 1060 : Duplicate column name 'category_id'

Nothing wrong with the query as you can see

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

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

Reply via email to