auto generation of user id

hi

how can i generate an automatic user id for oracle db,.

in my requirement, i have a jsp page with set of fileds, and a "Add button" .

Whenever the user submits the "Add button" the

db has to generate an auto user id for that and insert into db.

need help

Thnks

[309 byte] By [goodprograma] at [2007-11-27 2:31:39]
# 1
http://www.datanamic.com/support/autoinc-oracle.html
kmangolda at 2007-7-12 2:46:40 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Thnx buddy
goodprograma at 2007-7-12 2:46:41 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

hi

in the given link,

http://www.datanamic.com/support/autoinc-oracle.html

it says that

To make an Oracle autoincrement column in DeZign for Databases:

Select Dictionary | Sequences from the application menu.

In the Sequences dialog, add a new sequence (let's say Sequence_1). Press OK to save your changes.

Go to the Entity dialog of the entity which owns

--

i didnt get to the point --" select dictionary | sequence from app menu"

where to look for it ?

pls i need ur help.

tnx

goodprograma at 2007-7-12 2:46:41 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
A quick search of google could have solved your problem: http://www.google.com/search?hl=en&q=oracle+primary+key+auto+increment&btnG=Google+Search http://www.whitewater.be/script/result.asp?action=view&id=99
kmangolda at 2007-7-12 2:46:41 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

Hint, if you definie a field as SERIAL, then the ID sequence will be created for you automatically on schemename.tablename_id_seq.

LikeCREATE TABLE schemename.tablename (

ID SERIAL PRIMARY KEY,

...

);

Oracle and PostgreSQL only tho. Other DB's uses AUTO_INCREMENT (MySQL) or IDENTITY (MSSQL, DB2)

BalusCa at 2007-7-12 2:46:41 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...