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

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

        <small id='Y8czk'></small><noframes id='Y8czk'>

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

      1. 如何在 SELECT 语句中使用 BOOLEAN 类型

        How to use BOOLEAN type in SELECT statement(如何在 SELECT 语句中使用 BOOLEAN 类型)

          • <legend id='PIsnH'><style id='PIsnH'><dir id='PIsnH'><q id='PIsnH'></q></dir></style></legend>

              <small id='PIsnH'></small><noframes id='PIsnH'>

                  <bdo id='PIsnH'></bdo><ul id='PIsnH'></ul>
                    <tbody id='PIsnH'></tbody>

                  <i id='PIsnH'><tr id='PIsnH'><dt id='PIsnH'><q id='PIsnH'><span id='PIsnH'><b id='PIsnH'><form id='PIsnH'><ins id='PIsnH'></ins><ul id='PIsnH'></ul><sub id='PIsnH'></sub></form><legend id='PIsnH'></legend><bdo id='PIsnH'><pre id='PIsnH'><center id='PIsnH'></center></pre></bdo></b><th id='PIsnH'></th></span></q></dt></tr></i><div id='PIsnH'><tfoot id='PIsnH'></tfoot><dl id='PIsnH'><fieldset id='PIsnH'></fieldset></dl></div>
                  <tfoot id='PIsnH'></tfoot>
                  本文介绍了如何在 SELECT 语句中使用 BOOLEAN 类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个参数为 BOOLEAN 的 PL/SQL 函数:

                  I have a PL/SQL function with BOOLEAN in parameter:

                  function get_something(name in varchar2, ignore_notfound in boolean);
                  

                  此功能是第三方工具的一部分,我无法更改.

                  This function is a part of 3rd party tool, I cannot change this.

                  我想在像这样的 SELECT 语句中使用这个函数:

                  I would like to use this function inside a SELECT statement like this:

                   select get_something('NAME', TRUE) from dual;
                  

                  这不起作用,我收到此异常:

                  This does not work, I get this exception:

                  ORA-00904:TRUE":无效标识符

                  ORA-00904: "TRUE": invalid identifier

                  据我所知,无法识别关键字 TRUE.

                  As I understand it, keyword TRUE is not recognized.

                  我怎样才能做到这一点?

                  How can I make this work?

                  推荐答案

                  你可以像这样构建一个包装函数:

                  You can build a wrapper function like this:

                  function get_something(name in varchar2,
                                     ignore_notfound in varchar2) return varchar2
                  is
                  begin
                      return get_something (name, (upper(ignore_notfound) = 'TRUE') );
                  end;
                  

                  然后调用:

                  select get_something('NAME', 'TRUE') from dual;
                  

                  您的版本中 ignore_notfound 的有效值是什么取决于您,我假设TRUE"表示 TRUE,其他任何表示 FALSE.

                  It's up to you what the valid values of ignore_notfound are in your version, I have assumed 'TRUE' means TRUE and anything else means FALSE.

                  这篇关于如何在 SELECT 语句中使用 BOOLEAN 类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

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

                  1. <small id='fMWyI'></small><noframes id='fMWyI'>

                    • <bdo id='fMWyI'></bdo><ul id='fMWyI'></ul>
                            <tfoot id='fMWyI'></tfoot>