[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] any SQL gurus?
- Subject: [ale] any SQL gurus?
- From: matthew.brown at cordata.com (Matthew Brown)
- Date: Wed Jan 21 10:36:31 2004
- In-reply-to: <[email protected]>
SELECT COPY.copy_key, TITLE.title_key, TITLE.name FROM COPY INNER JOIN TITLE
on COPY.title_key = TITLE.title_key WHERE COPY.owner = [your-owner-value]
(888) 681-2262 . (770) 795-0089 .
* Windows and Linux Networks
* Web Development & Hosting
* Application Development & Hosting
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jason
Sent: Wednesday, January 21, 2004 10:20 AM
To: Atlanta Linux Enthusiasts
Subject: [ale] any SQL gurus?
Hi guys, this has been driving me nuts and maybe you would enjoy figuring it
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.
field title_key PRIMARY KEY
field name CHAR
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
I'm sure this is simple and obvious and I'll feel like more of an idiot
Ale mailing list
Ale at ale.org