1. <i id='dkfQR'><tr id='dkfQR'><dt id='dkfQR'><q id='dkfQR'><span id='dkfQR'><b id='dkfQR'><form id='dkfQR'><ins id='dkfQR'></ins><ul id='dkfQR'></ul><sub id='dkfQR'></sub></form><legend id='dkfQR'></legend><bdo id='dkfQR'><pre id='dkfQR'><center id='dkfQR'></center></pre></bdo></b><th id='dkfQR'></th></span></q></dt></tr></i><div id='dkfQR'><tfoot id='dkfQR'></tfoot><dl id='dkfQR'><fieldset id='dkfQR'></fieldset></dl></div>
      <bdo id='dkfQR'></bdo><ul id='dkfQR'></ul>
  2. <small id='dkfQR'></small><noframes id='dkfQR'>

    1. <legend id='dkfQR'><style id='dkfQR'><dir id='dkfQR'><q id='dkfQR'></q></dir></style></legend>
    2. <tfoot id='dkfQR'></tfoot>

      如何在 SQLPlus 或 PL/SQL 中创建菜单

      How to create a menu in SQLPlus or PL/SQL(如何在 SQLPlus 或 PL/SQL 中创建菜单)
          <tbody id='x3rF8'></tbody>

        <legend id='x3rF8'><style id='x3rF8'><dir id='x3rF8'><q id='x3rF8'></q></dir></style></legend>

        1. <tfoot id='x3rF8'></tfoot>

        2. <small id='x3rF8'></small><noframes id='x3rF8'>

            <bdo id='x3rF8'></bdo><ul id='x3rF8'></ul>

            1. <i id='x3rF8'><tr id='x3rF8'><dt id='x3rF8'><q id='x3rF8'><span id='x3rF8'><b id='x3rF8'><form id='x3rF8'><ins id='x3rF8'></ins><ul id='x3rF8'></ul><sub id='x3rF8'></sub></form><legend id='x3rF8'></legend><bdo id='x3rF8'><pre id='x3rF8'><center id='x3rF8'></center></pre></bdo></b><th id='x3rF8'></th></span></q></dt></tr></i><div id='x3rF8'><tfoot id='x3rF8'></tfoot><dl id='x3rF8'><fieldset id='x3rF8'></fieldset></dl></div>

              • 本文介绍了如何在 SQLPlus 或 PL/SQL 中创建菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有几个脚本,我想从提供给 SQLPlus 用户的菜单开始.类似于:

                请选择:
                1:做脚本a
                2:做脚本b
                3:做脚本c

                I have several scripts that I would like to start from a menu presented to the SQLPlus user. Something like:

                Please make a selection:
                1: Do script a
                2: Do script b
                3: Do script c

                我只需要一个正确方向的观点,而不是一个快速的答案.

                I just need a point in the right direction, not a quick answer.

                推荐答案

                这是一个 SQL Plus 脚本:

                Here is a SQL Plus script to do that:

                prompt Please make a selection:
                prompt 1: Do script a
                prompt 2: Do script b
                prompt 3: Do script c
                
                accept selection prompt "Enter option 1-3: "
                
                set term off
                
                column script new_value v_script
                
                select case '&selection.'
                       when '1' then 'script_a'
                       when '2' then 'script_b'
                       when '3' then 'script_c'
                       else 'menu'
                       end as script
                from dual;
                
                set term on
                
                @&v_script.
                

                注意 case 表达式的 ELSE 部分中的菜单"是此脚本的名称,以便在用户输入无效选项时它会再次运行.

                NB The 'menu' in the ELSE part of the case expression is the name of this script, so that it runs itself again when the user enters an invalid option.

                这篇关于如何在 SQLPlus 或 PL/SQL 中创建菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                Creating a flattened table/view of a hierarchically-defined set of data(创建分层定义的数据集的扁平表/视图)
                MySQL: how to do row-level security (like Oracle#39;s Virtual Private Database)?(MySQL:如何做到行级安全(如 Oracle 的 Virtual Private Database)?)
                What is the best way to enforce a #39;subset#39; relationship with integrity constraints(强制执行具有完整性约束的“子集关系的最佳方法是什么)
                Split String by delimiter position using oracle SQL(使用 oracle SQL 按分隔符位置拆分字符串)
                How to unfold the results of an Oracle query based on the value of a column(如何根据列的值展开Oracle查询的结果)

                • <small id='SJESd'></small><noframes id='SJESd'>

                  <legend id='SJESd'><style id='SJESd'><dir id='SJESd'><q id='SJESd'></q></dir></style></legend>
                  • <bdo id='SJESd'></bdo><ul id='SJESd'></ul>
                  • <tfoot id='SJESd'></tfoot>
                      <tbody id='SJESd'></tbody>
                    <i id='SJESd'><tr id='SJESd'><dt id='SJESd'><q id='SJESd'><span id='SJESd'><b id='SJESd'><form id='SJESd'><ins id='SJESd'></ins><ul id='SJESd'></ul><sub id='SJESd'></sub></form><legend id='SJESd'></legend><bdo id='SJESd'><pre id='SJESd'><center id='SJESd'></center></pre></bdo></b><th id='SJESd'></th></span></q></dt></tr></i><div id='SJESd'><tfoot id='SJESd'></tfoot><dl id='SJESd'><fieldset id='SJESd'></fieldset></dl></div>