0

I am trying to execute this query but i am getting the following error:

Error report -
ORA-02000: missing ( keyword
02000. 00000 -  "missing %s keyword"

The query is:

CREATE TABLE transfer(
    notransaksi NUMBER GENERATED ALWAYS AS IDENTITY CONSTRAINT transfer_pk PRIMARY KEY,
    waktutransaksi TIMESTAMP DEFAULT SYSDATE NOT NULL,
    norekpengirim NUMBER(20),
    norekpenerima NUMBER(20),
    nominaltransfer NUMBER,
    keterangan VARCHAR2(15),
    CONSTRAINT norekpengirim_fk FOREIGN KEY(norekpengirim) REFERENCES rekening(norekening),
    CONSTRAINT norekpenerima_fk FOREIGN KEY(norekpenerima) REFERENCES rekening(norekening)
);

What keyword is missing from my query and and where should I put the missing word on my query?

I've tried to add some keywords but still not working

  • Which version of Oracle are you using? I'm guessing below 12c, so the identity syntax doesn't exist yet? If so then you need to use a sequence and a trigger - which you may know since you tagged this with [triggers]... – Alex Poole Dec 05 '22 at 15:06

0 Answers0