Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Database Systems - NULL Values
Play lesson

Database Systems with SQL - Full Course - Database Systems - NULL Values

5.0 (0)
6 learners

What you'll learn

This course includes

  • 4.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

A database value may be NULL, which means that it’s either missing, unknown, or just does not apply. NULL is not equivalent to blank for text, or 0 for numerical data types. Some database table columns should should not be NULL, such as an ID column which represents a unique identifier for that row of data. When creating a table, you can prevent NULL values by specifying a column is NOT NULL. This causes the database to reject when a row is inserted with missing data in any column that is set to NOT NULL. When you are using arithmetic operators, such as + - * /, or comparison operators and you have one or more NULL values, the result ends up being NULL. In a SQL query, you can the IS NULL condition to select rows with NULLs. Ex: SELECT Name FROM Friends WHERE Phone IS NULL; SQL also has built-in aggregate functions such as SUM, MAX, MIN, and AVG. They all ignore NULL values when they are used. For example, if you were calculating the Max of numbers, it would ignore the number that is NULL before returning the result. Boolean values are represented as 0 in the database for FALSE, or 1 for TRUE. Subscribe to Appficial for more programming videos coming soon. Also, don't forget to click LIKE and comment on the video if it helped you out!

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

FAQs

Course Hive
Download CourseHive
Keep learning anywhere