Kie
Kie

Reputation: 1

Create Table with java eclispe

I am trying to complete a homework assignment that where we use java to create a database in derby, access, and MySQL. I'm trying to create a table, but it won't let me. I've looked over my query and nothing seems to be wrong, but it still gives me this error.

java.sql.SQLSyntaxErrorException: Syntax error: Encountered "order" at line 1, column 14.

I even checked my code in the derby connection tab. It worked for the other tables I created so, I thought nothing was wrong with it. The create table code in the derby connect

I don't know what to do and I'm on limited time. I've also added the correct libraries, my teacher confirmed it. Its due Sunday. Please help.

pic of my table I'm trying to create in the driver

Upvotes: 0

Views: 73

Answers (1)

Saheed
Saheed

Reputation: 312

@Kie you could change the table name from order to something else like CustOrder, because order is a key word in SQL. Also i don't think there's any need for concatenating the query.

Upvotes: 1

Related Questions