Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Clarification on the limitation of sequence generator in T-SQL

$
0
0

Hi, I found this limitation of sequence numbers for T-SQL:

"If there are multiple instances of the NEXT VALUE FOR function specifying the same sequence generator within a single Transact-SQL statement, all those instances return the same value for a given row processed by that Transact-SQL statement. This behavior is consistent with the ANSI standard."

From this link: 
 http://technet.microsoft.com/en-us/library/ff878058.aspx

Does this mean that if we want to have different value generated then we can't use it in multi-threading environment whereby multiple instances / processes are calling the same T-SQL code that generate the sequence numbers using theNEXT VALUE FOR function?
My understanding of the above might not be correct, any sample example to illustrate this limitation? 

Thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles