zoukankan      html  css  js  c++  java
  • ORA-01733: virtual column not allowed here

     基表: hr.tt  scott.tt
     视图1: 基于 hr.tt  union all  scott.tt ---》 scott.ttt
     视图2: 基于 视图1-》scott.ttt 创建 system.tt


    问题再现:
    SQL> create table hr.tt (a number);
    Table created.
    SQL>  create table lixora.tt (a number);
    Table created.

    SQL> create view  scott.tt as select * from  hr.tt union all select * from lixora.tt;
    View created.


    SQL> create view system.tt as select * from scott.tt;
    View created.

    SQL> select * from system.tt
             A
    ----------
             1

    更新视图2:
    SQL> update  system.tt set a=2;
    update  system.tt set a=2
                          *
    ERROR at line 1:
    ORA-01733: virtual column not allowed here



    更新视图1:
    SQL> update  scott.tt set A=2;
    update  scott.tt set A=2
                  *
    ERROR at line 1:
    ORA-01732: data manipulation operation not legal on this view


    SQL> !oerr ora 1732
    ORA-01733: virtual column not allowed here 
    Cause: An attempt was made to use an INSERT, UPDATE, or DELETE statement on an expression in a view. 
    Action: INSERT, UPDATE, or DELETE data in the base tables, instead of the view.

    总结:

    无法对包括表达式的view 进行dml 操作


  • 相关阅读:
    信息熵的域值范围(转载)
    KNN
    足球分析
    Json方法
    数据清洗
    图像旋转,背景指定像素填充
    将博客搬至CSDN
    gray灰度标签图转coco数据集
    facebook-pytorch maskrcnn-benchmark训练自己的数据集
    voc定位数据xml转coco数据集格式json
  • 原文地址:https://www.cnblogs.com/slgkaifa/p/7065002.html
Copyright © 2011-2022 走看看