oracle - ORA-02253: constraint specification not allowed here -
create table log_table( log_id varchar2(1000) primary key, voter_id varchar2(1000), date_logged date constraint abc foreign key (voter_id) references voters(voter_id) ) the table works when create without date element. when add date element says:
ora-02253: constraint specification not allowed here
the table works when create without date element
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) ) you have add , before constraint:
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) ) i reconsider datatype of log_id/voter_id (number/integer).
Comments
Post a Comment