请检查下面的表结构和要插入该表的记录。
CREATE TABLE [tabGeneraltable](
id int identity,
[codGenLedger] [uniqueidentifier] NOT NULL,
[codInvoice] [numeric](18, 0) NULL,
[accountValue] [numeric](18, 2) NULL,
[articleValue] [nvarchar](50) NULL,
[codFinAccount] [int] NULL,
[documentNbr] [nvarchar](50) NULL,
[valueDate] [datetime] NULL,
[insertDate] [datetime] NULL,
CONSTRAINT [PK_tabGeneralLedger] PRIMARY KEY CLUSTERED([codGenLedger] ASC)
)
insert into [tabGeneraltable]([codGenLedger],[codInvoice], [codFinAccount],
[accountValue],[insertDate])
select NEWID(),1,11,232,getdate()
union all
select NEWID(),10,45,214,getdate()
union all
select NEWID(),9,425,410,getdate()
union all
select NEWID(),14,475,356,getdate()
Run Code Online (Sandbox Code Playgroud)
插入所有记录后,当在这个表上执行一个简单的选择语句时
select * from tabGeneraltable
Run Code Online (Sandbox Code Playgroud)
标识列 ID 的顺序不正确或记录是随机插入的。(insertDate
如果单独插入所有记录,请检查列值。)
为什么会发生这种情况?