auto generate Number

G

G

Hello Firends

I want a sample code for developing an " auto genearte number " and want to
store in database.

Please if you find any code please send

Thanks in Advance
G
 
A

anthonybrough

Hi G

This would probably better posted to another group. however I have
found that it is better to allow the database to generate the the
number for you. If using access then try AUTONUMBER, if using oracle
then use a sequence to generate the number Not 100% sure about SQL but
I believe you can us @@Identity.

Reagrds


Tony
 
M

Mike Brind

SQL Server has an auto-increment field. @@Identity gets the value of the
identity column of the most recently added record using the same connection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top