我创建了下表:
CREATE TABLE [dbo].[tblArchLogDetail](
[RecordID] [numeric](18, 0) NOT NULL,
[TableName] [varchar](30) NOT NULL,
[TotalRecords] [int] NULL,
[ArchivedRecords] [int] NULL,
CONSTRAINT [PK_tblArchLogDetail] PRIMARY KEY CLUSTERED
(
[RecordID] ASC,
[TableName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
那么,如何在该表中插入行呢?我不断收到错误“违反主键约束”。这是我的示例代码:
Insert into tblArchLogDetail values(54,'tblAuditLogin',13128,0)