Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

error while runing table creation code

Posted on 2012-03-25
2
Medium Priority
?
285 Views
Last Modified: 2012-03-25
Is there anythng wrong wid the following code-
stmt.execute("create table order(ORDER_INDEX INTEGER not null GENERATED ALWAYS AS IDENTITY CONSTRAINT orderno_pk primary key,ONAME VARCHAR(30),DESC VARCHAR(30),CUSTOMER VARCHAR(30),PHONE INTEGER,ORDERDATE VARCHAR(30),DELIVERYDATE VARCHAR(30),ADVANCE DECIMAL(20,2),BAL DECIMAL(20,2))");
i am getting the attached error..pls help..
run.txt
0
Comment
Question by:daydreamer6565
2 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 37764433
'order' is a reserved word in MySQL and should not be used for table or column names.
0
 

Author Closing Comment

by:daydreamer6565
ID: 37764440
The table is created..Thanks ..
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question