Top "Null" questions

Null means *nothing* or *unknown*, depending on context.

What is the use of adding a null key or value to a HashMap in Java?

HashMap allows one null key and any number of null values. What is the use of it?

java null hashmap key
How do I insert NULL values using PDO?

I'm using this code and I'm beyond frustration: try { $dbh = new PDO('mysql:dbname=' . DB . ';host=' . HOST, …

php mysql pdo null sql-insert
Testing pointers for validity (C/C++)

Is there any way to determine (programatically, of course) if a given pointer is "valid"? Checking for NULL is easy, …

c++ c validation pointers null
ALTER TABLE, set null in not null column, PostgreSQL 9.1

I have a table with not null column, How to set a null value in this column as default? I …

postgresql null postgresql-9.1
Which is preferred: Nullable<T>.HasValue or Nullable<T> != null?

I always used Nullable<>.HasValue because I liked the semantics. However, recently I was working on someone else's …

c# .net null nullable
Why can't I check if a 'DateTime' is 'Nothing'?

In VB.NET, is there a way to set a DateTime variable to "not set"? And why is it possible …

vb.net datetime null nullable nothing
Can I use if (pointer) instead of if (pointer != NULL)?

Is it safe to check a pointer to not being NULL by writing simply if(pointer) or do I have …

c++ pointers if-statement null null-pointer
Create unique constraint with null columns

I have a table with this layout: CREATE TABLE Favorites ( FavoriteId uuid NOT NULL PRIMARY KEY, UserId uuid NOT NULL, …

sql postgresql database-design null referential-integrity
What is the difference between null and System.DBNull.Value?

Is there any difference between null and System.DBNull.Value? If yes, what is it? I noticed this behavior now …

c# null dbnull
How to do ToString for a possibly null object?

Is there a simple way of doing the following: String s = myObj == null ? "" : myObj.ToString(); I know I can do …

c# .net string object null