I want to add a virtual column age in a view.
The table is defined as:
CREATE TABLE PERSON (
, FIRST_NAME VARCHAR2(25 BYTE)
, LAST_NAME VARCHAR2(25 BYTE) NOT NULL
, BIRTH_DATE DATE NOT NULL
)
I'm creating a view with:
CREATE OR REPLACE VIEW v_person as SELECT
first_name,
last_name,
birth_date,
age (NUMBER(8,0)) generated always as(sysdate - birth_date) virtual
FROM
person;
I'm getting this error:
ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
*Cause:
*Action: