467,915 Members | 1,274 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

sequence in MS SQL

Im using MS SQL Server as my database in a java application. I want to have something like sequence(of Oracle) in MS SQL. But I left with nothing.

Is there any way to have a variable in MS SQL which is incremented automatically like a sequence(of Oracle)
OR
should I go for a procedure for this purpose?
Nov 30 '08 #1
  • viewed: 4247
Share:
1 Reply
ck9663
Expert 2GB
@tiijnar
Variable, you might need to manually increment it inside your loop.

Column, yes. Consider IDENTITY property of an numeric column.

-- CK
Dec 2 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Anthony Best | last post: by
5 posts views Thread by Eric E | last post: by
1 post views Thread by Marek Lewczuk | last post: by
3 posts views Thread by Daniel Wilson | last post: by
14 posts views Thread by pat270881 | last post: by
6 posts views Thread by Defcon2030 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.