Рет қаралды 5
What is Not Null constraint in SQL?
#sqltutorialforbeginners #databasemanagement #sqlserver
Linkedin Group: / 14478259
Chapters:
00:05 Understanding the Not Null Constraint
00:11 Explanation of Not Null Constraint
00:24 Practical Example
00:48 Create Table Syntax
01:18 Conclusion
01:23 Outro and Call to Action
Hello everyone, welcome to Educate Cube. Today, what will we learn? About the Not Null constraint and what it is. The Not Null constraint shows that a column does not contain null values. This constraint collectively helps maintain the integrity and consistency of the data within a database.
What it does is ensure that if anyone is entering data into a particular column, they make sure that no null values are entered. For example, if someone is filling out the employee table and doesn't enter an employee ID, and it gets ingested, this constraint will prevent that from happening.
Let's look at the syntax for creating a table. It’s simple. Create a table, here’s the column name ID, sorry, ID, then its data type is integer, followed by primary key. Sorry, primary key, and then if we have the name written as varchar(50), which is our data type, we write not null. This is how we define the Not Null constraint.
That's all for today's video. Thank you for watching Educate Cube. Like, share, and subscribe to our channel and press the bell icon to receive the latest updates. Also, follow us on Facebook and Instagram.