CREATE TABLE [dbo].[Register](
[ID] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [nvarchar](50) NULL,
[LastName] [nvarchar](50) NULL,
[Username] [nvarchar](50) NULL,
[Email] [nvarchar](50) NULL,
[Password] [nvarchar](50) NULL,
[Role] [nvarchar](50) NULL,
[Phone] [int] NULL,
[OrganisationID] [int] NOT NULL,
[CreatedAt] [datetime] NULL CONSTRAINT [DF__Register__Create__3D2915A8] DEFAULT (getdate()),
CONSTRAINT [PK_Register] PRIMARY KEY CLUSTERED
this is the table which i have created. here the organisation ID is foreign key and coming to my design part
i have
firstname, alstname,phone,email,password,role,organisationame after entering these these details, and clicked on submit button i m getting error as :
Cannot insert the value NULL into column 'OrganisationID', table 'Resource Management.dbo.Register'; column does not allow nulls. INSERT fails.
The statement has been terminated.