• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

auto-increament in ms sql server2000

 
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?
 
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.
 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!