What's null value? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 3

What's null value?

16th Nov 2018, 6:08 AM
Ashutosh Singh
Ashutosh  Singh - avatar
3 ответов
+ 26
//for SQL [from a lesson I made earlier] we use null value when the value is not known or meaningless. A column is said to contain a null if no value is assigned to that column . Any column of any datatype of a table can contain null provided they are not restricted by PRIMARY KEY or NOT NULL as the integrity constraints . example - CREATE TABLE class(rollno int primary key, marks int, sname varchar(30) not null); while inserting records in the table class using INSERT statement , only marks column can be omitted , if any column other than marks is skipped or omitted than error message will appear that record is not added example- INSERT INTO class(rollno,marks) VALUES(10111,9); //error message will be displayed because sname column can't have null value //☺👍
16th Nov 2018, 9:14 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 3
Null = nothing, no value.
16th Nov 2018, 6:35 AM
Geoffrey L
Geoffrey L - avatar
+ 2
Sorry I am joining today app it's OK I tried to leaning sql thanks
16th Nov 2018, 4:19 PM
Ashutosh Singh
Ashutosh  Singh - avatar