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

      <tfoot id='Fc7sq'></tfoot>

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

      • <bdo id='Fc7sq'></bdo><ul id='Fc7sq'></ul>
      1. Oracle 中的视图是什么?

        时间:2023-09-18
      2. <i id='g0rhV'><tr id='g0rhV'><dt id='g0rhV'><q id='g0rhV'><span id='g0rhV'><b id='g0rhV'><form id='g0rhV'><ins id='g0rhV'></ins><ul id='g0rhV'></ul><sub id='g0rhV'></sub></form><legend id='g0rhV'></legend><bdo id='g0rhV'><pre id='g0rhV'><center id='g0rhV'></center></pre></bdo></b><th id='g0rhV'></th></span></q></dt></tr></i><div id='g0rhV'><tfoot id='g0rhV'></tfoot><dl id='g0rhV'><fieldset id='g0rhV'></fieldset></dl></div>

            <tfoot id='g0rhV'></tfoot>
              <tbody id='g0rhV'></tbody>
              <bdo id='g0rhV'></bdo><ul id='g0rhV'></ul>

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

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

                  本文介绍了Oracle 中的视图是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Oracle 中的视图是什么?

                  What is a view in Oracle?

                  推荐答案

                  Oracle 和其他数据库系统中的视图 只是存储在内存中的 SQL 语句的表示,以便它可以很容易被重复使用.例如,如果我们经常发出以下查询

                  A View in Oracle and in other database systems is simply the representation of a SQL statement that is stored in memory so that it can easily be re-used. For example, if we frequently issue the following query

                  SELECT customerid, customername FROM customers WHERE countryid='US';
                  

                  要创建视图,请使用 CREATE VIEW 命令,如本例所示

                  To create a view use the CREATE VIEW command as seen in this example

                  CREATE VIEW view_uscustomers
                  AS
                  SELECT customerid, customername FROM customers WHERE countryid='US';
                  

                  此命令创建一个名为 view_uscustomers 的新视图.请注意,除了定义此视图的数据字典条目外,此命令根本不会导致任何内容实际存储在数据库中.这意味着每次查询此视图时,Oracle 都必须出去执行该视图并查询数据库数据.我们可以这样查询视图:

                  This command creates a new view called view_uscustomers. Note that this command does not result in anything being actually stored in the database at all except for a data dictionary entry that defines this view. This means that every time you query this view, Oracle has to go out and execute the view and query the database data. We can query the view like this:

                  SELECT * FROM view_uscustomers WHERE customerid BETWEEN 100 AND 200;
                  

                  Oracle 会将查询转换成这样:

                  And Oracle will transform the query into this:

                  SELECT * 
                  FROM (select customerid, customername from customers WHERE countryid='US') 
                  WHERE customerid BETWEEN 100 AND 200
                  

                  使用视图的好处

                  • 所用代码的共性.由于视图基于一组常见的 SQL,这意味着当它被调用时,它不太可能需要解析.
                  • 安全.长期以来,视图一直用于隐藏实际包含您正在查询的数据的表.此外,视图可用于限制给定用户有权访问的列.
                  • 谓词推送

                  您可以在这篇文章中找到关于如何创建和管理视图的高级主题在 Oracle 中."

                  You can find advanced topics in this article about "How to Create and Manage Views in Oracle."

                  这篇关于Oracle 中的视图是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Oracle 中的 OVER 子句 下一篇:VARCHAR2(10 CHAR) 和 NVARCHAR2(10) 的区别

                  相关文章

                  <legend id='SHdgY'><style id='SHdgY'><dir id='SHdgY'><q id='SHdgY'></q></dir></style></legend>
                      <bdo id='SHdgY'></bdo><ul id='SHdgY'></ul>

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

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

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