Thanks much!
ViSolve DB Team-2 wrote:
>
> Hello,
>
> Try this...
>
> select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid
> from rqhistory a left join relay b
> on (a.rhrqid = b.rqid and (a.rhrqsid = b.rlsid or a.rhrqsid = b.sid or
> a.rhrssid = b.rlsid or a.rhrssid = b.sid))
> where a.rhrqsi
Hello,
Try this...
select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid
from rqhistory a left join relay b
on (a.rhrqid = b.rqid and (a.rhrqsid = b.rlsid or a.rhrqsid = b.sid or
a.rhrssid = b.rlsid or a.rhrssid = b.sid))
where a.rhrqsid = 101 or a.rhrssid = 101
Thanks,
ViSolve DB Team
- Ori
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
...
Actually, it is possible to be female and to be an Ac
Sorry, i meant "gender", not "genre".
-Forwarded Message-
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
Actors
==
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
Actors
==
act_id
name
genre ENUM('m','f')
Then, the table DVD. If we ma
> [EMAIL PROTECTED] wrote:
>>> DVD_Actor:
>>> dvd_ID REFERENCES DVD
>>> actor_ID REFERNCES Actor
>>
>> Is this how you setup a join table ?
>
> Yes.
>
>
>> what exactly is the references keyword ?
>
> It indicates a foreign key. Full syntax is something like:
> dvd_ID CONSTRAINT dvc_fk FOREIGN KEY
[EMAIL PROTECTED] wrote:
DVD_Actor:
dvd_ID REFERENCES DVD
actor_ID REFERNCES Actor
Is this how you setup a join table ?
Yes.
what exactly is the references keyword ?
It indicates a foreign key. Full syntax is something like:
dvd_ID CONSTRAINT dvc_fk FOREIGN KEY REFERENCES DVD (dvd_ID)
Read the ma
>
> DVD_Actor:
> dvd_ID REFERENCES DVD
> actor_ID REFERNCES Actor
>
Is this how you setup a join table ? what exactly is the references
keyword ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Bjorn Barton-Pye wrote:
I am using a test database to teach myself MYSQL and am using my DVD
collection as the subject. I have 3 tables in this example:
Actresses
===
actr_id
name
Actors
==
acto_id
name
DVD
==
Title
acto_id
actr_id
The acto_id and actr_id in the DVD table indicates the
> so soemthing like
>
> select * from dvd left join actresses actr on actr.actr_id=dvd.actr_id
> left join actors acto on acto.acto_id=dvd.acto_id or by dvd.title
>
>
totally forgot, to get a really good query especially when you use Innodb
it doesnt like null values on foreign keys, i'd setup a r
> So, can somebody please correct the following query (and explain the
> syntax) so that it will work please? (I haven't tried putting an outer
> join in it because I don't understand the syntax.)
>
> Select
> actr.name,
> acto.name,
> dvd.title
> from
> actresses actr,
>
"Harlan Feinstein" <[EMAIL PROTECTED]> wrote:
> I've joined them an SQL statement that looks like this:
>
> select val, status
> from A
> left outer join B on val=id;
>
> What I'd LIKE is a 90-row result set, with the "status" field from table B
> when there was data available. What I'm getting i
12 matches
Mail list logo