Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: why does this NOT fail
Within the subselect, the alias t is still bound to table 1; hence, t.a is
sort of a constant in the subselect. It should not fail. In the past, I've
come across some DBMS that would not maintain the binding of aliases outside
of the subselect, ie, t.a is not valid there and would cause a syntax error.
I believe Oracle treat the scoping as the way I described it above.
John Boehm <jboehm_at_peabodygroup.com> wrote in message
news:jHAB3.13040$Ik5.124102_at_dfw-read.news.verio.net...
> Table1 (a varchar2(10),
> b varchar2(10));
>
> Table2 (c varchar2(10),
> d varchar2(10) );
>
>
> select t.* from table1 t where
> t.a in (
> select t.a from table2 x where x.d = 'aaaaa');
>
> I get rows back from a query very similar to this, where the
> table1 attribute 'a' is not in table2. I think it should fail.
> Any ideas???
>
>
>
Received on Wed Sep 08 1999 - 17:48:41 CDT
![]() |
![]() |