File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes auto-increament in ms sql server2000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "auto-increament in ms sql server2000" Watch "auto-increament in ms sql server2000" New topic
Author

auto-increament in ms sql server2000

sanjay hande
Greenhorn

Joined: Apr 05, 2005
Posts: 7
I want to create an auto-increament like thing in MS Sql Server2000 (which is possible with MySql).
I am not sure whether that functionality is there in the SQL Server 2000. I think we use sequence in Oracle to do the same thing.
The column will have nos generated automatically which otherwise would increament by themselves as the data is inserted into the row.

I am using sql server 2000 with java.

and will i have to write the functionality in java or it can be at the database level only?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
I think we have Unique Identifier data type in sql server 2000.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Check the documentation for IDENTITY modifier.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by David Ulicny:
Check the documentation for IDENTITY modifier.


Yes. I agreed with David Ulicny. Actually, IDENTITY modifier is more like auto-number thing, whereas unique identifier is something else, something big, something different.

check this out for IDENTITY vs unique identifier.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: auto-increament in ms sql server2000