In sql database column, empty fields will be set to NULL unless we specify it using NOT NULL. What are the advantages of using one instead of the other? Thanks!
If you need to represent unknown data in a column, you make it nullable. If you will always have data in the column, it's better to make it not nullable, as
When a field is set to NOT NULL, it cannot be empty. Which means you have to specify a value for that field when inserting a record.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With