Hello Henry,

Wednesday, July 16, 2003, 5:35:49 PM, you wrote:

I've noticed 2 errors.
First: You describe table with name: PUBLISHER but useing in SQL table
PUBISHER - missing a letter "L"
Second: As I'm understanding you want to make join table PUBLISHER
with table TITLES. But see what you wrote in SQL: "FROM pubishers JOIN
pubishers ON pubishers.pub_id = titles.pub_id"
You trying to make join table with itself.

H> I have 2 tables with the following fields :

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

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

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

H> SELECT pubishers.pub_id, titles.pub_ID
H> FROM pubishers JOIN pubishers ON pubishers.pub_id = titles.pub_id

H> It keeps giving me the following error :

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

H> Can someone tell me what I am doing wrong  ?










-- 
Best regards,
 Krasimir_Slaveykov                            mailto:[EMAIL PROTECTED]
Tel: ++359 2 97 666                                 [EMAIL PROTECTED]
Tel: ++359 2 97 66 701
Fax: ++359 2 97 66 731


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

Reply via email to