Videos
-
Where and why exactly a null is used?
-
What is exactly null and not null? To my understanding Not null we use when its mandatory to insert some value in that field, also when we give check constraint so by default the column will be not null right?
-
By adding new column through alter method default values are null, so how would I be able to insert values in it and is it right to give not null constraint to that new column while adding through alter method, basically when null and when not null to be used?...
god this is so confusing please help me, ik im asking alot but im really confused
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
- Dealing with nulls can be annoying and counterintuitive
- It saves a bit of space
- On some database systems, null values are not indexed.
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.