Join Bill Weinman for an in-depth discussion in this video Understanding NULL, part of MySQL Essential Training (2014).
…Null is a special state for the result no value.…This is necessary because it's often important to distinguish between…zero value or an empty string for a nonvalue result.…For this lesson we're going to use the scratch database and I'm going…to create a simple table here, and I'm going to insert a row.…And we'll go and display that row with select.…I noticed in the results in the a column the world null.…Null is this special state in SQL.…It's not really a value.…
It's the lack of a value.…So you cannot test for it as you would a…normal value with the equal sign because it has no value.…So if I say, SELECT ASTERISK FROM test…WHERE a equals NULL, we'll get no result because there is no…row where a is equal to NULL, because NULL is…not a value so it cannot satisfy the equal to expression.…NULL is a lack of value, so to test for…NULL you say a is null instead of equal to null.…
So if I test for where a is null, I get that row "Is Null" is a special…condition in SQL just like "IS NOT NULL" is a special condition.…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.