| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Ravinder Bhalla <Ravinder(dot)Bhalla(at)ipix(dot)com> |
| Cc: | sfpug(at)postgresql(dot)org |
| Subject: | Re: Bug or expected behaviour |
| Date: | 2003-12-16 01:23:26 |
| Message-ID: | 20031215172132.C97064@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | sfpug |
On Mon, 15 Dec 2003, Ravinder Bhalla wrote:
> Does that mean
>
> Both the following query will throw same result (assuming empname aslo exist
> in Dept)
>
> select * from emp where empid in ( select empname from dept);
I think this is effectively the same as:
select * from emp where empid=empname and exists(select 1 from dept)
> select * from emp where empid in ( select empid from dept) ;
And this one would be:
select * from emp where empid=empid and exists(select 1 from dept)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Alban | 2003-12-16 02:25:45 | SIG-BEER-WEST this Saturday 8/16 in San Francisco |
| Previous Message | Ravinder Bhalla | 2003-12-15 22:35:37 | Re: Bug or expected behaviour |