Oracle
 sql >> Database >  >> RDS >> Oracle

ORA-02253:specifica del vincolo non consentita qui

create table log_table(
log_id varchar2(1000) primary key,
voter_ID varchar2(1000),   -- comma
CONSTRAINT abc FOREIGN KEY (voter_ID) REFERENCES voters(voter_ID)
)

Devi aggiungere , prima del vincolo:

create table log_table(
log_id varchar2(1000) primary key,
voter_ID varchar2(1000),
date_logged date, -- here
CONSTRAINT abc FOREIGN KEY (voter_ID) REFERENCES voters(voter_ID)
)

Riconsidererei anche il tipo di dati di log_id /voter_id come (NUMERO/INTERO).