ORA-54013: Do not allow INSERT operations on virtual columns
This is a new feature of Oracle 11-Virtual columns.
In previous versions of Oracle, when we needed to use expressions or some calculation formulas, we created a database view, and if we needed to use the index on this view, we would create a function-based index. Now Oracle 11 allows us to use virtual columns directly on the table to store expressions. The values of the virtual columns are not stored on the disk, and they are calculated temporarily at the time of the query, based on the defined expression. We cannot insert data into a virtual column, nor can we implicitly add data to a virtual column, and we can only insert data using physical columns. The value of the virtual column can then be queried, and the expression is calculated 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 following data table name is: APEX_CW_ Monthly statement Details table
Using the command window in Oracle, enter the statement to view the table structure: SQL>DESC APEX_CW_ Monthly checkout statement Details table;
After execution, you see the following table structure:
Name Type Nullable Default Comments--------------------------------------- -------------------------------------pk_monthbilldetailid VARCHAR2 (F) K_monthbillid VARCHAR2 y BARCODE VARCHAR2 (y) Custcode VARCHAR2 (8) Y CU Stname VARCHAR2 (x) y excharge number (18,2) y Citycode VARCHAR2 (3) Y EXP Ortday DATE y oricharge number (18,2) y Incomedcharge number (18,2) Y ISHA Ndled VARCHAR2 (1) Y Payerid VARCHAR2 (8) Y Payername VARCHAR2 (x) Y managecity VARCHAR2 (Ten) Y cityname VARCHAR2 (y) Destincity VARCHAR2 (3) Y Destincityname VARCHAR2 ( Y ITEM VARCHAR2 (6) Y ServerType VARCHAR2 (1) Y Destincoun CHAR (2) Y oricurrency VARCHAR2 (3) Y TaxAmount FLOAT (x) Y chargeweight number (10,3 ) Y Exportcity VARCHAR2 (3) Y STRFD1 VARCHAR2 (y) createtime DATE y Monthbilltype VARCHAR2 (2) Y SUBSTR ("Fk_monthbillid", 1, 1)
The field ' Monthbilltype ' from the last line seen above is obtained by the field ' Fk_monthbillid ' in the second row, so if you insert (assign) The field ' Monthbilltype ' in the table, the exception will be reported.
If there are other operations on the table that report this exception, the reason is generally the case.
Oracle Database: ORA-54013 Error resolution