Re: [SQL] a select statement that sometimes joins

2001-04-10 Thread Oliver Elphick
Mark Stosberg wrote: > > > >Here's a situation I've run into more than once with SQL: > >I want to select all the rows in a table that match a criteria, where one >of the criteria is possibly having a related entry in a second table. For >my example, lets say I have table named 'me

[SQL] a select statement that sometimes joins

2001-04-10 Thread Mark Stosberg
Here's a situation I've run into more than once with SQL: I want to select all the rows in a table that match a criteria, where one of the criteria is possibly having a related entry in a second table. For my example, lets say I have table named 'messages' and another named 'message_attachment