views:

288

answers:

2

Hi. I'm coming from MySQL world, please help.

Is it possible to create autoincrement key from NetBeans IDE in JavaDB?

Do you use some more advanced db clients, which?

Thanks.

+1  A: 

If you look at this url: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javadb/

this part of the schema may be what you are looking for.

 ID          INTEGER NOT NULL 
                PRIMARY KEY GENERATED ALWAYS AS IDENTITY 
                (START WITH 1, INCREMENT BY 1),
James Black
Thanks. Yes, but I don't need an IDE in order to do that. If I use IDE and it's gui tools, I want to be able to do that from the interface. If I end up creationg tables from plain SQL, then why am I using netbeans? I'm still beginner with derby syntax :P
umpirsky
But, I was just showing that you can create auto-generated keys for JavaDB, but as you mentioned you will be creating the schema yourself, in SQL.
James Black
Thanks. But I knew that, I just can't see the way to do it from netbeans. Will try with alter table...
umpirsky
A: 

thank u very much

Sarath