select level l1 from dual connect by 1=1

We have text for SELECT:
------------------------------
select level l1 from dual connect by 1=1
------------------------------
in oracle 8.1.7.2, DOA and TOAD:
- ORA-01436 CONNECT BY loop in user data
------------------------------
in oracle 9.2.0.6.0, DOA and TOAD:
- 25 rows processed (1..25)
------------------------------
in oracle 8.1.7.2 and 9.2.0.6.0, sql-plus:
SQL> select level l1 from dual connect by 1=1;
L1
---------
1
------------------------------
in oracle 8.1.7.2 and 9.2.0.6.0, DOA and TOAD and sql-plus:
DECLARE
x NUMBER;
CURSOR c1 IS SELECT LEVEL l1 FROM dual CONNECT BY 1=1;
BEGIN
FOR r1 IN c1 LOOP
dbms_output.put_line (TO_CHAR (r1.l1));
END LOOP;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line (SQLERRM);
END;
/
return 1
------------------------------
 
Back
Top