| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Tang Tim Hei <timheit(at)netvigator(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: A strange problem |
| Date: | 2005-08-27 15:25:49 |
| Message-ID: | 20050827082325.R73063@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sat, 27 Aug 2005, Tang Tim Hei wrote:
> 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?
Not really. You're doing a cartesian join between test.currency and
test.country. If there are no rows in test.country, there are no rows in
the output of the from clause.
> select A.* from test.currency A, test.country B where A.curr_cd='USD'
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chris Travers | 2005-08-27 17:07:09 | Re: POSS. FEATURE REQ: "Dynamic" Views |
| Previous Message | Douglas McNaught | 2005-08-27 15:24:34 | Re: A strange problem |