全部博文(136)
分类: Oracle
2009-07-02 20:24:39
BEGIN
FOR i IN 1..4 LOOP
dbms_output.put_line(i);
END LOOP -- 这里没有分号!
COMMIT;
END; |
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production SQL> set serveroutput on
SQL> BEGIN
2 FOR i IN 1..4 LOOP
3 dbms_output.put_line(i);
4 END LOOP
5 COMMIT;
6 END;
7 /
1
2
3
4
PL/SQL procedure successfully completed |