Search code examples
javadatabasenetbeansjavadb

Java DB error when creating a table in Netbeans


I am creating a table within my database in Netbeans (Java DB).

I have created the database and I am connected to it.

This is my first and only table:

enter image description here

and the error I am receiving is this:

enter image description here

I am an amateur when it comes to databases and I have tried searching high and low to find what I'm doing wrong. I've tried:

  • Changing the table name to all lower case, all capitals and how it is now too.
  • Changing the primary key.
  • Changing the column names.
  • Changing the size of the column uid (which is fixed to 0 unless the data type is changed - I assume for obvious reasons this is correct anyway)

Where am I going wrong?


Solution

  • User is a reserved keyword in many databases. You should choose another name, or add quotation marks (") around the table name.