Ora-01733:virtual Column not allowed here

Source: Internet
Author: User

Base table: Hr.tt scott.tt
View 1: Based on HR.TT UNION ALL scott.tt---"scott.ttt
View 2: Create system.tt based on view 1-"scott.ttt


Problem reproduction:
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

Update View 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



Update View 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 in this view


sql>!oerr ora 1732
Ora-01733:virtual Column not allowed here
Cause: An attempt is made to the use of 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.

Summarize:

Cannot perform DML operation on view containing an expression


Ora-01733:virtual Column not allowed here

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.