D
D
DTX2017-04-23 12:56:13
MySQL
DTX, 2017-04-23 12:56:13

Is it necessary to add NOT NULL to a column, if there are certainly no NULLs there?

Will it give anything in terms of performance or just avoid errors?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-04-24
@DirecTwiX

1. Null means no value. If you have a column that, logically, cannot be without a value, but null can be written into it, this is evidence of the poor design of your
database . On small volumes, you will not notice this, but if you work with a large, highly loaded base, speed will play a huge role

R
Roman Frank, 2017-04-24
@Akellacom

It will help you avoid mistakes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question