NULL values not allowed in SQL fields.

Question:

Why does a table generated inside SQL by E3 not allow writing NULL values in their fields, unlike Oracle?

Solution:

First, you need to understand each database’s behavior when generating a table via E3:

  • Oracle: when creating a new table, or when inserting a new field into a pre-existing table, all fields (which aren’t ‘key’) allow NULL values.
  • SQL Server: when creating a new table, no NULL values are allowed by any fields. But when adding fields to a pre-existing table, these new fields will allow NULL values.
  • Access: when creating a new table, or when inserting a new field into a pre-existing table, no NULL values are allowed by any fields. NOTE: when a new filed is added to a pre-existing table, all records in that field start as NULL, but you can’t add new NULL records.

Therefore, to have new NULL values be accepted by in the fields of an SQL field, you must generate a table with ordinary fields, so the field’s Allow Nulls option is disabled. After that, erase this field and insert the fields being used by E3, and then update the table by clicking the Generate Table option in the Historic. Once the table has been updated, check the fields: their Allow Nulls option will be enabled, therefore allowing you to write NULL values.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *