Set ORACLE table fields default value to a formular

后端 未结 2 1409
粉色の甜心
粉色の甜心 2021-01-15 05:20

I have an oracle table like this:

create table tms_transaction_tbl
(
trans_id number primary key,
location_id number,
trans_date date,
resource_id number,
ts         


        
2条回答
  •  情书的邮戳
    2021-01-15 06:07

    You cannot refer to other columns in the DEFAULT expression

    Here is the snippet from Oracle Documentation

    Restriction on Default Column Values A DEFAULT expression cannot contain references to PL/SQL functions or to other columns, the pseudocolumns CURRVAL, NEXTVAL, LEVEL, PRIOR, and ROWNUM, or date constants that are not fully specified.

提交回复
热议问题