du måste ange primärnyckeln, det räcker inte att ställa in identitet
CREATE TABLE [dbo].[DeTai](
[ID] [int] IDENTITY(1,1) NOT NULL,
[MaDeTai] AS ('DT'+right('000000'+CONVERT([varchar](10),[ID]),(6))) PERSISTED NOT NULL,
[TenDeTai] [nvarchar](255) NOT NULL,
[LinhVuc] [nvarchar](255) NOT NULL,
[Nam] [int] NOT NULL,
[MaGV] [varchar](8) NOT NULL,
constraint PK_DeTail_ID primary key (ID)
)