List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 17 1999 3:07pm
Subject:Re: about "left join" help me !!!!!
View as plain text  
On Thu, 1999-09-16 16:36:23 +0800, miweichong wrote:

> I have three tables on my database: content,category,check 
> I want to select some records:
> first:
>       I must find something that in
>"some string" and content.level>1;
> second:
>       If I had found 9 records from first step,I must find something
>       which in check.action="some string"
>       from the 9 records.
> So I write SQL statement:
>   select content.title from content left join category on
> left join check on
> where"newsclass" and
>   check.action="OK" and content.level>1;

Hmm, is there some reason to use LEFT JOINs instead of normal joins?

From your description, I'd write:
  SELECT content.title
  FROM   content, category, check
     AND content.level>1
     AND check.action="OK";

Does this work?

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
about "left join" help me !!!!!joe16 Sep
  • Re: about "left join" help me !!!!!Martin Ramsch17 Sep