sql - Oracle SQL Developer 将我的工作视图标记为损坏
问题描述
谁能告诉我为什么我的 Oracle SQL Developer 在实际工作时将我的视图标记为损坏?
它不仅仅是 1 个视图,而是 10 个视图有相同的问题,它们都是在不同的时间创建的,带有子查询或连接到多个表,并且总是工作正常。
提前致谢!
解决方案
视图可能因引用对象的更改而失效。与存储的 PL/SQL 一样,下次使用时会发生重新编译,此时它将再次生效。例如:
SQL> create table demo (id integer);
Table created
SQL> create or replace view v1 as select id from demo;
View created
SQL> select o.status from user_objects o where object_type = 'VIEW' and object_name = 'V1';
STATUS
-------
VALID
SQL> alter table demo modify id varchar2(10);
Table altered
SQL> select o.status from user_objects o where object_type = 'VIEW' and object_name = 'V1';
STATUS
-------
INVALID
SQL> select * from v1;
ID
----------
SQL> select o.status from user_objects o where object_type = 'VIEW' and object_name = 'V1';
STATUS
-------
VALID
推荐阅读
- javascript - 如何使用基于服务器的 groupBy 数据并在 ag-grid 中显示 - angular
- python - 关于 Scipy 中 Levenberg-Marquadt 实现的几个问题
- java - 解释 synchronized() 内部的 Commons Lang 代码?
- php - 预览页面 图像方向
- reactjs - 如何使用 react-sortable-hoc 访问 refs,withref
- json - 构建重复值的颠簸转换
- python - 如何确定 dateparser.search.search_dates() 是否返回日期、时间或日期时间
- python - Python PDF 文件文本提取
- javascript - 我对使用 javascript 将城市列表加载到下拉列表中有些困惑
- python - python中的语音翻译器