aspose file tools*
The moose likes JDBC and the fly likes create table auto_increment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "create table auto_increment" Watch "create table auto_increment" New topic
Author

create table auto_increment

Oczek Oczkowy
Greenhorn

Joined: Nov 01, 2006
Posts: 12
hi,
i have really simple quest. i use netbeans 5.5 and jdbc delivered. i need create new table with field autoincrement. i typed in netbeans sqlcommand:

i got error Error code -1, SQL state 42X01: Syntax error: Encountered "auto_increment" at line 3, column 25.
Line 1, column 1

Execution finished after 0 s, 1 error(s) occurred.

how to create autoincrement field? i tried type AUTO_INCREMENT and auto-increment but the result is the same.
thanks mooses


fak de sys
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

Oczek,
This syntax may be database specific. What database are you using?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Oczek Oczkowy
Greenhorn

Joined: Nov 01, 2006
Posts: 12
its a standard database delivered with netbeans tool.i have installed:

Java Platform, Enterprise Edition 5 (Java EE 5) Tools Bundle, Multi-language
Be among the first to take advantage of the ease-of-development features in Java EE 5! The Java EE 5 Tools Bundle, Multi-language is a complete, developer-friendly environment with all necessary runtimes installed and fully configured. Java EE 5 Tools Bundle, Multi-language includes the following components:
NetBeans IDE 5.5, Multi-language
NetBeans Enterprise Pack 5.5, Multi-language
Sun Java System Application Server Platform Edition 9 Update 1, Multi-language
Project Open ESB Starter Kit, Multi-language
Sun Java System Access Manager 7.1 Beta
Java EE 5 Samples
Java BluePrints
API docs (Javadoc)
Your First Cup: An Introduction to the Java EE Platform
gierre treter
Greenhorn

Joined: May 09, 2007
Posts: 1
hi
i have the same problem...
i can't set a auto_increment field
someone can help us?

bye
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create table auto_increment