I'm developing a Java system with Spring Boot and created the table as not null
as you can see:
CREATE TABLE categoria (
codigo BIGSERIAL,
nome VARCHAR(50) NOT NULL,
PRIMARY KEY(codigo)
);
The problem was that getting a bank account as null
was not supposed to happen, I did a brief search on the internet and find this command to know the description of my table;
SELECT column_name FROM information_schema.columns WHERE table_name ='categoria';
But it only brings me this information, it does not tell me if the table was actually created as not null
.
How do I know if the table is as not null
?