I would like to modify an existing column of my table in a virtual column. By opening the "SQL" tab in Oracle SQL Developer, the current column is (table DDL):
"ENABLED" NUMBER(1,0) DEFAULT '1'
I would like to convert this column to a virtual column and get the following result:
"ENABLED" NUMBER(1,0) GENERATED ALWAYS AS ("SCHEMA-NAME"."PRODUCT_ENABLED"("PRODUCT_ID")) VIRTUAL VISIBLE
To do this I wrote the following query:
ALTER TABLE SCHEMA-NAME.SP_PRODUCT MODIFY ENABLED NUMBER(1,0) GENERATED ALWAYS AS ("SCHEMA-NAME"."PRODUCT_ENABLED"("PRODUCT_ID")) VIRTUAL VISIBLE;
I'm not sure this is the right way to go, could you help me find the right solution?