[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Wed Jan 21 10:26:58 2004 -->
- <!--x-from-r13: cunfrsk ng znthfncghf.pbz (Xnfba Sgurevqtr) -->
- <!--x-message-id: 39DB03CC-4C25-11D8-B25B-[email protected] -->
- <!--x-subject: [ale] any SQL gurus? -->
- <li><em>date</em>: Wed Jan 21 10:26:58 2004</li>
- <li><em>from</em>: phasefx at magusaptus.com (Jason Etheridge)</li>
- <li><em>subject</em>: [ale] any SQL gurus?</li>
I have two tables: TITLE and COPY. There is a one-to-many relationship
between the two; for any given title, there could be many copies.
Copies have owners, but titles don't belong to anyone.
table TITLE:
field title_key PRIMARY KEY
field name CHAR
table COPY:
field copy_key PRIMARY KEY
field title_key FOREIGN KEY
field owner CHAR
However, owners would like a list of what titles they happen to have
copies for. I can do this through brute-force with a programming
language, but is there a single SQL query I could use? Specifically,
MySQL (I don't have sub-selects)?
I'm sure this is simple and obvious and I'll feel like more of an idiot
later. *8)
Thanks,
Jason
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00841" href="msg00841.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> matthew.brown at cordata.com (Matthew Brown)</li></ul></li>
<li><strong><a name="00844" href="msg00844.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> docx at io.com (Dylan Northrup)</li></ul></li>
<li><strong><a name="00846" href="msg00846.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> ale at jeffx.com (Jeff Tillotson)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00837.html">[ale] checking multiple accounts with pine</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00839.html">[ale] USB->IDE problems</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00898.html">[ale] Reinstall GRUB</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00841.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00838"><strong>Date</strong></a></li>
<li><a href="threads.html#00838"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>