By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,414 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,414 IT Pros & Developers. It's quick & easy.

sequence in MS SQL

P: 14
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)
should I go for a procedure for this purpose?
Nov 30 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,878
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.