SQL Error: ORA-00904: : invalid identifier in creating table -
sql error: ora-00904
my code is:
create table vintagewine ( wine_id varchar2(5) not null, wine_name varchar2(25) not null vintage_year varchar2(4) not null, employee_id varchar2(6) not null, constraint pk_vintagewine primary key(wine_id), constraint fk1-vintagewine foreign key(wine_name) references wine(wine_name), );
error:
error @ command line:8 column:14 error report: sql error: ora-00904: : invalid identifier 00904. 00000 - "%s: invalid identifier" *cause: *action:
i don't know what's wrong code. did dumb?
either constraint fk1-vintagewine
illegal, or fk1-vintagewine
must quoted, think. use underscore instead of hyphen.
Comments
Post a Comment