ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 047-190

047-190

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-19 10:46:16 0 删除 编辑
190. Which SQL statement would display the view names and definitions of all
the views owned by you?
A. SELECT view_name, text FROM user_view;
B. SELECT view_name, text FROM user_object ;
C. SELECT view_name, text FROM user_objects;
D. SELECT view_name, text FROM user_views;
Answer: D
1: You can check the data dictionary’s USER_OBJECTS view to determine the
status of any of your views, like this:
SELECT STATUS, OBJECT_TYPE, OBJECT_NAME
FROM USER_OBJECTS
WHERE STATUS = 'INVALID'
ORDER BY OBJECT_NAME;
In our case, the output is:
------- ------------------- ----------------
INVALID VIEW EMP_PHONE_BOOK
INVALID VIEW VW_EMPLOYEES
2: The data dictionary contains a lot of information about views, including
the query upon which the view is based, which can be found in the USER_VIEWS
view and its TEXT column. Here’s a query on the data dictionary that asks
for the query that was used to create the view VW_EMPLOYEES:
SELECT TEXT FROM USER_VIEWS WHERE VIEW_NAME = 'VW_EMPLOYEES';

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718976/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-175
下一篇: 047-192
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    203053