Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: astonishing(?) sql
Marcin Buchwald <Marcin.Buchwald_at_agora.pl> wrote in message news:<3C4C022B.76E0B2A6_at_agora.pl>...
> Let promocja and kategoryzacja by any tables with master detail
> relationship.
> The query below completely ignores the last where clause.
> It produces rows with value of the third column different from 216.
>
> select t.rowid, t.detid, t.masnic
> from (select *
> from (select k.xx detid, p.xx masnic
> from promocja p, kategoryzacja k
> where p.kat_xx=k.xx
> ) order by masnic ) t
> where t.masnic=216
> /
>
> Can You explain this?
>
> Regards,
>
> Marcin
it works for me !!!
SQL> ed
Wrote file afiedt.buf
1 select t1.deptno, t1.empno
2 from (select * from
3 (Select a.deptno as deptno, a.empno as empno from emp a, dept b
where a.deptno = b.deptno) order by deptno)t1
4* where t1.deptno = 10
SQL> /
DEPTNO EMPNO
---------- ----------
10 7369 10 7369 10 7369
Regards,
Ganesh R
Received on Mon Jan 21 2002 - 07:12:43 CST