1. <legend id='E6zTJ'><style id='E6zTJ'><dir id='E6zTJ'><q id='E6zTJ'></q></dir></style></legend>
  2. <small id='E6zTJ'></small><noframes id='E6zTJ'>

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

      表名周围的引号究竟有什么作用?

      What exactly do quotation marks around the table name do?(表名周围的引号究竟有什么作用?)
      <tfoot id='moNd7'></tfoot>

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

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

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

            <legend id='moNd7'><style id='moNd7'><dir id='moNd7'><q id='moNd7'></q></dir></style></legend>
              <tbody id='moNd7'></tbody>
              • 本文介绍了表名周围的引号究竟有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我认为引号 (") 只是一种分组标记,但我正在调试一些 NHibernate 代码并注意到虽然

                I thought that the quotation mark (") was simply a type of grouping marker but I'm debugging some NHibernate code and notice that while

                SELECT * FROM site WHERE site_id = 3;
                

                工作正常

                SELECT * FROM "site" WHERE site_id = 3;
                

                因表或视图不存在错误而失败.

                fails with a table or view does not exist error.

                是什么?

                推荐答案

                在 Oracle 中为标识符加上双引号会导致 Oracle 将标识符视为区分大小写,而不是使用默认的不区分大小写.如果创建的表(或列)在名称周围使用双引号,则必须始终使用双引号引用标识符并正确指定大小写(所有大写标识符除外,其中双引号没有意义)).

                Putting double-quotes around an identifier in Oracle causes Oracle to treat the identifier as case sensitive rather than using the default of case-insensitivity. If you create a table (or a column) with double-quotes around the name, you must always refer to the identifier with double quotes and by correctly specifying the case (with the exception of all upper case identifiers, where double-quotes are meaningless).

                在幕后,Oracle 总是进行区分大小写的标识符匹配.但它总是在进行匹配之前将没有双引号的标识符转换为大写.如果在标识符周围加上双引号,Oracle 会跳过转换为大写.

                Under the covers, Oracle is always doing case-sensitive identifier matching. But it always casts identifiers that are not double-quoted to upper case before doing the matching. If you put double-quotes around an identifier, Oracle skips the casting to upper case.

                所以如果你做类似的事情

                So if you do something like

                CREATE TABLE my_table( 
                  col1 number,
                  col2 number
                )
                

                你可以

                SELECT * FROM my_table
                SELECT * FROM MY_TABLE
                SELECT * FROM My_Table
                SELECT * FROM "MY_TABLE"
                

                不过类似

                SELECT * FROM "my_table" 
                

                会失败.

                另一方面,如果你做类似的事情

                On the other hand, if you do something like

                CREATE TABLE "my_other_table"( 
                  col1 number,
                  col2 number
                )
                

                你做不到

                SELECT * FROM my_other_table
                SELECT * FROM MY_OTHER_TABLE
                SELECT * FROM My_Other_Table
                SELECT * FROM "MY_OTHER_TABLE"
                

                但是这个

                SELECT * FROM "my_other_table" 
                

                会起作用

                这篇关于表名周围的引号究竟有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 查询中包含缺失的月份)
                  <tbody id='xV5Gu'></tbody>

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

                      <tfoot id='xV5Gu'></tfoot>
                          <bdo id='xV5Gu'></bdo><ul id='xV5Gu'></ul>
                        • <small id='xV5Gu'></small><noframes id='xV5Gu'>