Oops, I'm sorry, I've inserted predicate with rownum in the wrong place. Try like this: select x.z.o1,x.z.o2 from (select get_ot z from dual where rownum>0)x; -- Best regards, Sayan Malakshinov http://orasql.org