I would like to insert values in my database with this query:
INSERT INTO Users (pinConfirmed,Factor,DateUtc,LockoutEnabled,AccessCount,EmailConfirmed)
values ('false', 'false','1/1/2018' ,'false','0','false')
But I get this error: Cannot insert the value NULL into column 'Id', table 'Users'; column does not allow nulls. INSERT fails.
But, there are already data in the DB among which Id which is not null. I checked with these two requests and I have no null for Id.
select * from Users where Id IS NULL;
select * from Users where Id = 'NULL';
I don't understand where the problem is. Need help please.


Idisn't set to produce a value (such as an incrementing integer identity) then it would need a value provided. You're not providing one, hence the error.CREATE TABLE [dbo].[Users] ([Id] NVARCHAR (128) NOT NULL CONSTRAINT [PK_dbo.Users] PRIMARY KEY CLUSTERED ([Id] ASC) );. I can not do a self increment for values values