2
good morning gentlemen,
I made my attempt to create my Postgre table this way:
CREATE TABLE categoria (
codigo BIGSERIAL,
nome VARCHAR(50) NOT NULL,
PRIMARY KEY(codigo)
);
Despite the countryside name be as not null it is allowing it to be entered null as you can see below;
Image 1
proof of insertion:
field description:
Could it be that something was missing in the construction of the table for it to effect the not null in the field name?
We have no way of knowing, it is stating that it does not work and showing nothing that informs this, when, because, how it happens.
– Maniero
I just executed the same command here and it worked perfectly. Both columns as not null
– Rovann Linhalis
Sorry for my posting, I just corrected, @Maniero could take a look now please?
– wladyband
@Rovannlinhalis is there any verification I can do to analyze why this is happening?
– wladyband
I could not reproduce the problem, did what you did and returned error: http://sqlfiddle.com/#! 17/947d4/1
– Maniero
Try:
INSERT INTO categoria (codigo) values (7);
to check if there will still be the insertion.– Carlos Andrade
there was no = ERROR: null value in column "name" violates not-null Constraint please let me know what’s going on?
– wladyband
our weird @Maniero
– wladyband