Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

Null Fields and Field Default Values Considerations

The import utility checks if a table being imported was created with NULL FIELD support (this is true for tables created with c-treeDB API APIs). If the table being imported was created with NULL FIELD support, the import utility updates the SQL dictionaries accordingly, by setting the NULL FIELD flag to “Y”. If a table being imported has no NULL FIELD support, the NULL FIELD flag of the FairCom DB SQL dictionary will be set to “N” and the FairCom DB SQL dictionary default value for that field will be set to 0 for numeric fields, or “ ” for string fields.

Default values are not available for SQL_LONGVARCHAR and SQL_LONGVARBINARY field types and the NULL FIELD flag for those fields are always set to “Y”, even though null values are not supported for these types of fields. A side effect would be, for example, inserting a NULL value in a LONG VAR CHAR field and reading back an empty string when the field is retrieved from a record. Please note that this only affects tables created without NULL FIELD support.

TOCIndex