0
SQL not Null
If a column is set to not null and you write a insert into statement without inserting a value to it, will it ignore the whole statement or will it choose the next smallest value after null like 1? For example our table is students with the columns FName, LName, Age and Age is set to not null. If we do a insert statement like the following: Insert into students(FName, LName) values (John, Doe) what will happen to age or will it even work?
1 Odpowiedź
+ 1
From:
https://www.w3schools.com/sql/sql_notnull.asp
"This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field."
For something a bit more interactive:
https://www.techonthenet.com/sql/is_not_null.php