NULL handling when using variables: GNOME Data Access 5 manual

## NULL handling when using variables

When using variables in statements (see Variables syntax in SQL) for example like

    SELECT * FROM users WHERE name = ##name::string::null;

, database engines will generally not handle correctly the case where a variable is valued to NULL. For instance this example would result in the code being executed as

    SELECT * FROM users WHERE name = NULL;

which would probably give no result, whereas the expected equivalent code would be

    SELECT * FROM users WHERE name IS NULL;

Libgda automatically handles theses cases and makes sure the `IS NULL` or `IS NOT NULL` constructions are used when necessary. It won't of course handle variable's NULL values when using other operators that equal or different, tough.