I'm trying to insert data into a table:
INSERT INTO [RDO].[dbo].[observacaoProtocolos] (id_protocolo, statusObs1, observacao1, statusObs2, observacao2, statusObs3, observacao3, statusObs4, observacao4, statusObs5, observacao5, statusObs6, observacao6, statusObs7, observacao7, statusObs8, observacao8, statusObs9, observacao9, statusObs10, observacao10)
VALUES (153,'OK','','','','','','','','','','','','','','','','','','','')
However, the warning appears:
It is not possible to insert the NULL value in the column 'id_observacao', table 'RDO.dbo.observacaoProtocolos'; the column does not allow nulls. INSERT failed.
I created the table as follows:
CREATE TABLE observacaoProtocolos
(
id_observacao int NOT NULL,
id_protocolo int,
statusObs1 varchar(4),
observacao1 varchar(100),
statusObs2 varchar(4),
observacao2 varchar(100),
statusObs3 varchar(4),
observacao3 varchar(100),
statusObs4 varchar(4),
observacao4 varchar(100),
statusObs5 varchar(4),
observacao5 varchar(100),
statusObs6 varchar(4),
observacao6 varchar(100),
statusObs7 varchar(4),
observacao7 varchar(100),
statusObs8 varchar(4),
observacao8 varchar(100),
statusObs9 varchar(4),
observacao9 varchar(100),
statusObs10 varchar(4),
observacao10 varchar(100)
);