Por que isso me dá o mesmo valor, quatro 1?
USE [TSQL2012]
GO
IF OBJECT_ID('dbo.sqlsequence', 'SO') IS NOT NULL
DROP SEQUENCE dbo.sqlsequence;
GO
CREATE SEQUENCE [dbo].[SQLSequence] AS INT
START WITH 1
MAXVALUE 8 CYCLE
SELECT NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq1] ,
NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq2] ,
NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq3] ,
NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq4]
Mas isso funciona bem como esperado. Dá-me 1, 2, 3, 4
USE [TSQL2012]
GO
IF OBJECT_ID('dbo.sqlsequence', 'SO') IS NOT NULL
DROP SEQUENCE dbo.sqlsequence;
GO
CREATE SEQUENCE [dbo].[SQLSequence] AS INT
START WITH 1
MAXVALUE 8 CYCLE
SELECT NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq1]
SELECT NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq2]
SELECT NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq3]
SELECT NEXT VALUE FOR
[dbo].[SQLSequence] AS [Seq4]
De acordo com a documentação afirma: