Oracle Database ora 54013 Error Resolution _oracle

Source: Internet
Author: User
Tags oracle database

ORA-54013: INSERT operation is not allowed on virtual columns

This is a new feature of Oracle 11-Virtual columns.

In previous Oracle versions, when we needed to use expressions or some calculation formulas, we created a database view, and if we needed to use the index on that view, we would create a function based index. Oracle 11 now allows us to store expressions directly on the table using virtual columns. The values of virtual columns are not stored on disk, and they are temporarily computed based on the defined expression at query time. We can't insert data into a virtual column, we can't implicitly add data to a virtual column, we can only use physical columns to insert data. You can then query the value of the virtual column, which is evaluated immediately at the time of the query. Indexes and constraints can also be applied to virtual columns, and we can create foreign keys for virtual columns.

The data table name used below is: apex_cw_ Monthly billing Details table

Using the command window in Oracle, enter the statement to view the table structure: Sql>desc apex_cw_ monthly billing Details table;

After execution, see the following table structure:

 Name Type Nullable Default Comments------------------------------------------------- ---------------------------Pk_monthbilldetailid VARCHAR2 (km) fk_monthbillid VARCHAR2 (a) y BARCODE VARCHAR2 (a) y CU Stcode VARCHAR2 (8) y CustName VARCHAR2 (m) y excharge number (18,2) y Citycode VARCHAR2 (3) y exportday DATE y oricharg 
E number (18,2) y incomedcharge number (18,2) y ishandled VARCHAR2 (1) Y Payerid VARCHAR2 (8) Y Payername VARCHAR2 (m) y Managecity VARCHAR2 (a) y CityName VARCHAR2 (x) y destincity VARCHAR2 (3) y destincityname VARCHAR2 (x) y ITEM VARCHAR2 (6) Y servertype VARCHAR2 (1) y Destincoun CHAR (2) y oricurrency VARCHAR2 (3) y TaxAmount FLOAT () y chargeweight NUMB ER (10,3) y exportcity VARCHAR2 (3) y STRFD1 VARCHAR2 () y createtime DATE y monthbilltype VARCHAR2 (2) y SUBSTR ("Fk_mon Thbillid ", 1,1) 

The last line of field ' Monthbilltype ' from above is obtained from the field ' Fk_monthbillid ' in the second row, so if the insert (Assignment) operation on the field ' Monthbilltype ' in the table is reported as an exception.

This is generally the case if there are other actions on the table that report this exception.

The above is a small set to introduce the Oracle database ora 54013 wrong solution, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Related Article

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.