Writing NULLs and skipping columns
For some columns, nothing should be sent to the database when performing an INSERT or an UPDATE. Basically, you have to distinguish between the target structure field attribute "Skip empty SQL value" and sending an explicit NULL to the database. Both possibilities can be realised.
Skip empty value
A column can be skipped on an UPDATE/INSERT if the attribute "Skip empty SQL value" is set to "Yes". The column is skipped if no field value exists.
When is no field value available? In practice, if the function get empty flag() returns "true". The field value can explicitly be set to empty with the function set empty flag(), but this can also happen implicitly during unsuccessful parsing or by various other functions. If a field has the value "" (i.e. a string of length 0), function "get empty flag(a)" does not return "true".
Explicitly send NULL
A column value is sent to the database as NULL if the target structure field value is @NULL@. The value can only be set via function, but not via a fixed value (field attribute). Attribute "Skip empty SQL value" must be set to "No".
Note: In databases, you have to distinguish between the symbolic value NULL and the string 'NULL', the number 0 and an empty string '' (sometimes also called empty value), which are actual values. The symbolic value represents at the meta level that a table field, for example, does not have a value yet. In virtually every database management system, you can detect an optical difference between the symbolic value NULL and actual values. SQL queries also know this difference.
Note: If you assign value @NULL@ to a target structure field, this has the same effect as executing function set "empty flag(a)". I.e. the function would return true and in a mapping test, the field would be displayed with no value. However, explicitly writing the symbolic NULL value to the database can only be done with the actual target structure field value @NULL@. I.e. a target structure field with a set Empty Flag alone is not sufficient for writing the symbolic NULL value into the database.