1
I am 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 registered in the bank as null
this wasn’t 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 just brings me this information, it doesn’t tell me if it was actually created the table as not null
.
How do I know if the table is as not null
?
please, how will I execute this command on my table?
– wladyband
You don’t know how to use a simple
SELECT
? So I have the impression that you are doing something that is above what you know, I would go for simpler things before trying to do something complex, because this is the basics of SQL. But I put it on for you.– Maniero
thank you very much :)
– wladyband