How to create tables in Postgre with not null fields? [closed]

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)
); 

Although the name field is like not null it is allowing null to be inserted as you can see below;

Image 1

proofofinsertion:

fielddescription:

Could it be that something was missing in the construct of the table to make it not null in the name field?     

asked by anonymous 15.11.2017 / 12:40

0 answers