Re: A strange problem - Mailing list pgsql-general

From Douglas McNaught
Subject Re: A strange problem
Date
Msg-id m24q9bo11p.fsf@Douglas-McNaughts-Powerbook.local
Whole thread Raw
In response to A strange problem  (Tang Tim Hei <timheit@netvigator.com>)
List pgsql-general
Tang Tim Hei <timheit@netvigator.com> writes:

> Hi,
>   I'm new to postgresql. Anytime I type the following command to the database to run, it give me no result record if
table'country' is empty but can get result if 'country' is not empty. Is this so strange? 
>
>   select A.* from test.currency A, test.country B where A.curr_cd='USD'

You're doing an unconstrained join on "currency" and "country", and if
one of those two tables is empty the result will be empty.

-Doug

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: A strange problem
Next
From: Chris Travers
Date:
Subject: Re: POSS. FEATURE REQ: "Dynamic" Views