Skip to content
Advertisement

Problem when trying to create a table on SQL DEVELOPER [closed]

I was trying to create a table on SQL Developer, and I had the error called “Missing left parenthesis”, which I think it can be almost anything.

The code is this, and the 3 tables take the same error:

I have tried a lot of things and none has worked. It is probably something silly, so I would be grateful for any help.

Advertisement

Answer

Update: The issues were that the primary key constraint expects you to specify the columnname. I.e. `PRIMARY KEY (column_name). You also used the wrong column names in the Foreign Key constraint declaration. Lastly, there was a difference in column types between the key columns in the 2 initial tables and the referencing table, and you reused the same name for the cod_prod_pk constraint.

Fiddle

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement