`
04023129
  • 浏览: 159519 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

Oracle pl/sql 中实现 continue

阅读更多
CREATE TABLE AREAS
(
  RADIUS  NUMBER(5),
  AREA    NUMBER(14,2)
);
 
DECLARE
   pi   CONSTANT NUMBER (9, 7)  := 3.1415927;
   radius        INTEGER (5);
   area          NUMBER (14, 2);
BEGIN
   radius := 0;

   LOOP

      <<here>>
      radius := radius + 1;

      IF radius = 4
      THEN
         GOTO here;
      ELSE
         area := pi * POWER (radius, 2);

         INSERT INTO areas
              VALUES (radius, area);

         EXIT WHEN area > 100;
      END IF;
   END LOOP;

   COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
      ROLLBACK;
      RAISE;
END;
 
分享到:
评论

相关推荐

    Oracle PL/SQL programming(5th Edition)

    Understand and use new Oracle Database 11g features, including the edition-based redefinition capability, the function result cache, the new CONTINUE statement, fine-grained dependency tracking, ...

    Oracle PL/SQL程序设计(第5版)(下册)第二部分

    《Oracle PL/SQL程序设计(第5版)》基于Oracle数据库11g,从PL/SQL编程、PL/SQL程序结构、PL/SQL程序数据、PL/SQL中的SQL、PL/SQL应用构建、高级PL/SQL主题这6个方面详细系统地讨论了PL/SQL以及如何有效地使用它。...

    Oracle PL/SQL程序设计(第5版)(下册) 第一部分

    《Oracle PL/SQL程序设计(第5版)》基于Oracle数据库11g,从PL/SQL编程、PL/SQL程序结构、PL/SQL程序数据、PL/SQL中的SQL、PL/SQL应用构建、高级PL/SQL主题这6个方面详细系统地讨论了PL/SQL以及如何有效地使用它。...

    Oracle PL/SQL Programming, 5th Edition

    Understand and use new Oracle Database 11g features, including the edition-based redefinition capability, the function result cache, the new CONTINUE statement, fine-grained dependency tracking, ...

    oracle-pl-sql-programming-5th-edition

    Understand and use new Oracle Database 11g features, including the edition-based redefinition capability, the function result cache, the new CONTINUE statement, fine-grained dependency tracking, ...

    11g_plsql_user_guide_and_reference.pdf

    The PL/SQL features for 11g Release 1 (11.1) are: ■ Enhancements to Regular Expression Built-In SQL Functions ■ SIMPLE_INTEGER, SIMPLE_FLOAT, and SIMPLE_DOUBLE Data Types ■ CONTINUE Statement ■ ...

    精通SQL--结构化查询语言详解

    1.6.4 sql环境中对象的命名规则 18 第2章 主要的关系数据库与sql 21 2.1 sql server 21 2.1.1 sql server的结构 21 2.1.2 数据库访问标准化接口—odbc 22 2.1.3 使用查询分析器执行sql语句 22 2.2 transact-...

    精通SQL 结构化查询语言详解

    19.5 Oracle中嵌入式SQL的编译运行  19.5.1 嵌入式SQL代码 19.5.2 预编译文件  19.5.3 设置Visual C++ 6.0编译环境  19.5.4 编译运行程序  附录A SQL保留字  附录B 常用的SQL命令  附录C 关于运行环境...

    如何用Toad调试存储过程、触发器

    Starting with the 10g release, Oracle now offers a new interface, known as JDWP, for debugging PL/SQL and stored Java procedures. Toad fully supports both interfaces, but we recommend you continue to ...

    Oracle事例

    sql&gt; create user juncky identified by oracle default tablespace users sql&gt; temporary tablespace temp quota 10m on data password expire sql&gt; [account lock|unlock] [profile profilename|default]; ...

Global site tag (gtag.js) - Google Analytics