<bdo id='ySpob'></bdo><ul id='ySpob'></ul>
      <tfoot id='ySpob'></tfoot>

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

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

        如何从 Oracle 中的值列表中进行选择

        时间:2023-09-20
        1. <tfoot id='Royy8'></tfoot>
        2. <legend id='Royy8'><style id='Royy8'><dir id='Royy8'><q id='Royy8'></q></dir></style></legend>
            <bdo id='Royy8'></bdo><ul id='Royy8'></ul>

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

                  <tbody id='Royy8'></tbody>

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

                  本文介绍了如何从 Oracle 中的值列表中进行选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我指的是这个 stackoverflow 答案:

                  I am referring to this stackoverflow answer:

                  我该怎么办从 SQL Server 中的值列表中选择

                  如何在 Oracle 中完成类似的操作?

                  How could something similar be done in Oracle?

                  我在此页面上看到了其他使用 UNION 的答案,虽然这种方法在技术上可行,但我并不想在我的情况下使用它.

                  I've seen the other answers on this page that use UNION and although this method technically works, it's not what I would like to use in my case.

                  所以我想保留或多或少看起来像逗号分隔的值列表的语法.

                  So I would like to stay with syntax that more or less looks like a comma-separated list of values.

                  更新 关于创建类型表 答案:

                  我有一张桌子:

                  CREATE TABLE BOOK
                  (   "BOOK_ID" NUMBER(38,0)
                  )
                  

                  我使用这个脚本,但它没有向 BOOK 表中插入任何行:

                  I use this script but it does not insert any rows to the BOOK table:

                  create type number_tab is table of number;
                  
                  INSERT INTO BOOK (
                      BOOK_ID
                  )
                  SELECT A.NOTEBOOK_ID FROM
                      (select column_value AS NOTEBOOK_ID from table (number_tab(1,2,3,4,5,6))) A
                  ;
                  

                  脚本输出:

                  TYPE number_tab compiled
                  Warning: execution completed with warning
                  

                  但如果我使用这个脚本,它会向 BOOK 表中插入新行:

                  But if I use this script it does insert new rows to the BOOK table:

                  INSERT INTO BOOK (
                      BOOK_ID
                  )
                  SELECT A.NOTEBOOK_ID FROM
                      (SELECT (LEVEL-1)+1 AS NOTEBOOK_ID FROM DUAL CONNECT BY LEVEL<=6) A
                  ;
                  

                  推荐答案

                  您不需要创建任何存储类型,您可以评估 Oracle 的内置集合类型.

                  You don't need to create any stored types, you can evaluate Oracle's built-in collection types.

                  select distinct column_value from table(sys.odcinumberlist(1,1,2,3,3,4,4,5))
                  

                  这篇关于如何从 Oracle 中的值列表中进行选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在oracle中显示用户的所有权限? 下一篇:使用 Oracle 客户端 11 部署 .NET 应用程序所需的最少设置是什么?

                  相关文章

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

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

                    • <bdo id='d54rM'></bdo><ul id='d54rM'></ul>

                  1. <legend id='d54rM'><style id='d54rM'><dir id='d54rM'><q id='d54rM'></q></dir></style></legend>