What is NULL ?
In simple terms, NULL is simply a place holder for data that does not exist. When performing insert operations on tables, they will be times when some field values will not be available.
In order to meet the requirements of true relational database management systems, MySQL uses NULL as the place holder for the values that have not been submitted.
The screenshot below shows how NULL values look in database:
->NULL is not a data type - this means it is not recognized as an "int", "date" or any other defined data type.
->Arithmetic operations involving NULL always return NULL for example, 69 + NULL = NULL.
-> All aggregate functions affect only rows that do not have NULL values.
Below are example of NULL in database:
-> To Add column in student Table of my SQL data base. After add column in table , column values are automatic NULL before insert data in it.
*Query-syntax:- Alter table student_marks Add st_maths int;
-> After add the column in table. To update contents in modify column of student Table after that NULL values will be erase and new values are insert.
*Query-syntax:- update student_marks set st_maths=int where st_id=int;
In simple terms, NULL is simply a place holder for data that does not exist. When performing insert operations on tables, they will be times when some field values will not be available.
In order to meet the requirements of true relational database management systems, MySQL uses NULL as the place holder for the values that have not been submitted.
The screenshot below shows how NULL values look in database:
->NULL is not a data type - this means it is not recognized as an "int", "date" or any other defined data type.
->Arithmetic operations involving NULL always return NULL for example, 69 + NULL = NULL.
-> All aggregate functions affect only rows that do not have NULL values.
Below are example of NULL in database:
-> To Add column in student Table of my SQL data base. After add column in table , column values are automatic NULL before insert data in it.
*Query-syntax:- Alter table student_marks Add st_maths int;
-> After add the column in table. To update contents in modify column of student Table after that NULL values will be erase and new values are insert.
*Query-syntax:- update student_marks set st_maths=int where st_id=int;