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?
Search Result
Collapse
3 results in 0.0013 seconds.
Keywords
Members
Tags
-
Sequence generator
Hello,
Since SQL Server has no sequence generator, I wrote my own. (I claim
no ownership of it as it is closely modeled after earlier discussions
on this topic.) I have included the sql statements below.
While it works independently on its own, It seems to lock in multi-user
environments or in nested-transactions. It s funny really: I have my
main transaction, but the sequence generator below forces... -
sequence
Hi,
I need little help with Ms SQL Server 2000. I would like to know how to
create sequence or something like that. I want to have an automatic counter
for each row in one entity, so then I can do something like this:
INSERT INTO table VALUES (use sequence(someth ing), value, value, .... )
Can you please help me?
thx
Tomas...