This is because all the aggregate values ignore the NULL values. When you see the result of the query, you will notice that even though we have 3 NULL values the query says there are no NULL values. Now run the following command to count all the NULL values from the table. In the above script, we have inserted 3 NULL values. INSERT INTO Table1 VALUES (NULL),(NULL),(NULL) Honestly, this is a very simple thing to do but I can totally understand why my client was confused and here is a very simple script to demonstrate the issue of counting NULL values from Column.įirst, let us create a table and populate it with a few NULL Values. The question was about how to count NULL values from the column. The other day, I have received a very simple but interesting question by one of my earlier clients of Comprehensive Database Performance Health Check via email.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |