I am trying to create a table in my database to simulate an application. The issue is that it throws me the error
ORA-00907: missing right parenthesis
and I don't know why it occurs (it clearly mentions the right parenthesis, but according to me it is said parenthesis). What I want to achieve is that the id_game attribute is automatically incremented. I tell you that I am working on Oracle 18c XE. I present the code below:
CREATE TABLE BIBLIOTECA(
id_game INTEGER PRIMARY KEY DEFAULT nextval('serial'),
rank INTEGER NOT NULL,
name VARCHAR(64) NOT NULL
);
Since version 12c Oracle changed the way to generate this type of columns.
Now you should use:
In your case, this should work:
If you want other kinds of options, you can change them freely.
For more details, please refer to this tutorial or refer directly to the Oracle documentation .
fiddler
1 rows affected
1 rows affected
1 rows affected
db<>fiddle here