Search Postgresql Archives

Re: A strange problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tang Tim Hei <timheit@xxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux