Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

auto-increament in ms sql server2000

 
sanjay hande
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we have Unique Identifier data type in sql server 2000.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the documentation for IDENTITY modifier.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic