I am trying to create a table with Oracle SQL where two columns of the table should have a default value and should not be NULL.
I am getting the error you can see below, but i am not able to understand it, because the are no parenthesis to be closed there!
The Script
CREATE TABLE ENCUENTROS (
elocal constraint clave_extrana_equipos references equipos(code) not null enable,
evisitante constraint clave_extrana_equipos references equipos(code) not null enable,
fecha date,
plocal number constraint plocal_mayor_cero check (plocal > 0) default 0 not null enable,
pvisitante number constraint pvisitante_mayor_cero check (pvisitante > 0) default 0 not null enable);
The Error Message
plocal number constraint plocal_mayor_cero check (plocal > 0) default 0 not null enable, * ERROR at line 5: ORA-00907: missing right parenthesis
* is where Oracle detected the error
I'm at loss as to why there should be an error at that position.