[thelist] [sql] cross join question I believe...
Paul Bennett
paul at teltest.com
Wed Aug 27 23:27:04 CDT 2003
Hi there,
I have 3 tables
One holds "course" information
One holds "career" information
A course can have many careers associated with it
A career can be applied to many courses
I have a table "in between" them which links entries for a course id
with entries for a career id, this way I can have a list of courses on
one hand and a list of careers on the other and have a simple key table
int the middle with references to corresponding fields for both.
a) Is this the right thing to do?
I need to then (in one query because I am LOVING joins at the moment)
get all information for a "course" and all the "careers" which are
associated with it.
I am comfortable with left joins, but how do i say "get all course
information, as well as all careers from the careers table where the
career id in the "key" table corresponds to the "course id" in the key
table?
Does that make sense?
--
------------------------------
Paul Bennett
Internet Developer
Teltest Electronic Design
------------------------------
Email: paul at teltest.com
Phone: 64 4 237 4557
Web: http://www.teltest.com
Wap: http://wap.teltest.com
More information about the thelist
mailing list