Unable to perform Inner Join

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henry

    Unable to perform Inner Join

    I have 2 tables with the following fields :

    table : publisher
    field1: pub_id - Primary, int, auto

    table : titles
    field1: title_id - Primary, int, auto
    field1: pub_id - int

    Using sqlyog I noticed that the indexes had already been created for the
    Primary keys but according to my tutorial I also had to create an index for
    the foreign key.
    I did this and then tried to run the following query :

    SELECT pubishers.pub_i d, titles.pub_ID
    FROM pubishers JOIN pubishers ON pubishers.pub_i d = titles.pub_id

    It keeps giving me the following error :

    Error Code : 1066
    Not unique table/alias: 'pubishers'

    Can someone tell me what I am doing wrong ?






    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw

Working...