Multiple joins on same table

Codes here !

Moderators: macek, egami, gesf

Post Reply
Elena Mitovska
New php-forum User
New php-forum User
Posts: 13
Joined: Tue Nov 12, 2002 12:11 pm
Location: Ukraine
Contact:

Post by Elena Mitovska » Thu Dec 19, 2002 12:00 am

This might work as you need:

SELECT musiccd.musiccd_name, musicgroup.group_name, musicgroup2.group_name
FROM musiccd INNER JOIN musicgroup ON
musiccd.musiccd_group1 = musicgroup.musicgroup_id
LEFT OUTER JOIN musicgroup musicgroup2 ON
musiccd.musiccd_group2 = musicgroup2.musicgroup_id

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests