[mythtv-users] what is mythcommflag doing?

Edward Wildgoose edward.wildgoose at frmhedge.com
Sun Nov 23 15:30:41 EST 2003


> > > I don't know if anyone is interested, but there is an alternate
> > > syntax that may be easier to use.  Try:
> > >
> > > select r.chanid,starttime,endtime,title,subtitle,description,
> > > channum,callsign,name from recorded r, channel c
> > > where r.chanid = 1009 and starttime = 20030419200000 and
> > > r.chanid = c.chanid;
> >
...
> Sorry.  I guess I should have paid more attention to the thread.  I'm
> used to doing Oracle SQL queries 10-12 hours a day.  I'm not a big
> fan of "inner join" "outer join" etc.  Probably caused by having to deal
> with MS Access.  But since we're stuck with it, this might be a good
> time to mention:
>
> http://www.mysql.com/doc/en/JOIN.html
>
> Join to your hearts' content!  [Damn, I wish mySQL would implement
> (+) ]

Join syntax using the "," between table names rather than the INNER JOIN
syntax is deprecated in most sql syntaxes.  I'm suprised that you are using
it in Oracle?

The problem occurs when you have LEFT joins, because you can't show
evaluation order without using the LEFT JOIN style syntax.  What this means
is that certain types of query become ambiguous, and can behave in unusual
ways.

I would strongly recommend using the "INNER JOIN" and "LEFT JOIN" type
syntax where possible, it make queries much more obvious, and also passes
useful hints to the query optimiser (as well as dealing with the ambigous
outer joins).  I'm fairly sure that MS Access supports this syntax as well?

Ed W



More information about the mythtv-users mailing list