久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Oracle - FORCE 視圖選項在執(zhí)行后未顯示在視圖中

Oracle - FORCE view option isn#39;t shown on view after executed(Oracle - FORCE 視圖選項在執(zhí)行后未顯示在視圖中)
本文介紹了Oracle - FORCE 視圖選項在執(zhí)行后未顯示在視圖中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我們創(chuàng)建了一個用于處理復(fù)雜 SQL 的視圖,但是在使用 FORCE 選項.例如:

create or replace FORCE view testview as選擇 1從雙重;

FORCE 稍后查看視圖時移除

創(chuàng)建或替換視圖測試視圖為選擇 1從雙重;

<塊引用>

如果您想創(chuàng)建視圖,而不管視圖的基表或引用的對象類型是否存在,或者包含視圖的架構(gòu)的所有者是否對它們具有特權(quán),請指定 FORCE.在對視圖發(fā)出任何 SELECT、INSERT、UPDATE 或 DELETE 語句之前,這些條件必須為真.

如果視圖定義包含任何約束,如果基表不存在或引用的對象類型不存在,CREATE VIEW ... FORCE 將失敗.如果視圖定義命名了一個不存在的約束,CREATE VIEW ... FORCE 也會失敗.

是否僅在執(zhí)行時使用 FORCE 選項而沒有運行時影響?它是否僅用于強制覆蓋先前的視圖(即使出現(xiàn)錯誤)?

解決方案

是否僅在執(zhí)行時使用 FORCE 選項而沒有運行時影響?

是的.如果視圖語句無效 - 說有一個錯字并且 FROM 子句中的表名拼寫錯誤 - 通常 Oracle 不會創(chuàng)建視圖.通過使用 FORCE 關(guān)鍵字,視圖被創(chuàng)建但具有 'INVALID' 狀態(tài).這在某些情況下很有用,例如我們有一個構(gòu)建工具,它會在語句失敗時停止運行,但我們希望整個構(gòu)建完成,然后找出任何不一致之處.

<塊引用>

是否僅用于強制覆蓋之前的視圖

沒有.即使在此之前視圖不存在,我們也可以選擇使用 FORCE.當(dāng)我們使用依賴項 ALTER 一個 TYPE 時,用法與 FORCE 的用法略有不同.我們可以隨時創(chuàng)建或替換視圖.

We created a view for handling complex SQL, But when creating a view using FORCE option. e.g:

create or replace FORCE view testview as
select 1
from dual;

FORCE is removed when viewing the view later

create or replace view testview as
select 1
from dual;

Specify FORCE if you want to create the view regardless of whether the base tables of the view or the referenced object types exist or the owner of the schema containing the view has privileges on them. These conditions must be true before any SELECT, INSERT, UPDATE, or DELETE statements can be issued against the view.

If the view definition contains any constraints, CREATE VIEW ... FORCE will fail if the base table does not exist or the referenced object type does not exist. CREATE VIEW ... FORCE will also fail if the view definition names a constraint that does not exist.

Is using FORCE option is only in execution time with no runtime effects? and is it only used for force overriding the previous view (even on error)?

解決方案

Is using FORCE option is only in execution time with no runtime effects?

Yes. If the view statement is invalid - say there's a typo and the table name in the FROM clause is misspelled - normally Oracle wouldn't create the view. By using the FORCE keyword the view is created but with an 'INVALID' status. This can be useful in certain situations, e.g. we have a build tool which stops running if a statement fails but we would prefer the whole build to finish then sort out any inconsistencies.

is it only used for force overriding the previous view

No. We can choose to use FORCE even if the view doesn't exist prior to this moment. The usage is slightly different from the use of FORCE when we ALTER a TYPE with dependencies. We can always create or replace a view.

這篇關(guān)于Oracle - FORCE 視圖選項在執(zhí)行后未顯示在視圖中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應(yīng)該使用什么 SQL Server 數(shù)據(jù)類型來存儲字節(jié) [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
How to convert #39;2016-07-01 01:12:22 PM#39; to #39;2016-07-01 13:12:22#39; hour format?(如何將“2016-07-01 01:12:22 PM轉(zhuǎn)換為“2016-07-01 13:12:22小時格式?)
Convert multiple sub-queries to on join(將多個子查詢轉(zhuǎn)換為 on join)
How do I get the minute difference between 2 times in T SQL?(如何獲得 T SQL 中 2 次之間的微小差異?)
主站蜘蛛池模板: 在线色 | 91视频a| 午夜免费福利影院 | 久久婷婷国产香蕉 | 欧美电影免费观看高清 | 日韩欧美三区 | 午夜视频一区 | 男女羞羞视频在线 | 一区二区中文字幕 | 丁香六月伊人 | 国产 日韩 欧美 在线 | 一区二区三区欧美 | 天天干b| 天天躁日日躁性色aⅴ电影 免费在线观看成年人视频 国产欧美精品 | 国产欧美一区二区三区在线看 | 日本小视频网站 | 亚洲免费一区二区 | 国产精品视频999 | 亚洲色图综合 | 九九亚洲 | 色资源在线视频 | 人干人人 | 一区视频在线 | 午夜无码国产理论在线 | 男人天堂免费在线 | 亚洲成人网在线播放 | 在线观看中文字幕 | 插插插干干干 | 香蕉视频91 | 天天操网| 日本三级网址 | 日韩视频一区二区三区 | 久久九九影视 | 久久久毛片 | 欧美日韩一区二区在线观看 | www.青娱乐| 免费毛片在线 | 亚洲日本欧美 | 欧美日韩一区二区电影 | 国产精品久久久久久久久久 | 日韩精品视频在线 |