databaseoracle-databaserelational-databaseoracle-sql-data-modeler

Set field as nullable - Oracle Data Modeler


Anyone know where could I set a field in Oracle Data Modeler as nullable? When I generate the script all fields are set as NOT NULL.


Solution

  • Uncheck 'mandatory.' Ensure you don't have it configured to be a PK or a FK that's not optional.

    enter image description here

    Generating the DDL for this table, I can see the column STREET2 defined below as:

    CREATE TABLE hr.people (
        first_name    VARCHAR2(100 BYTE) NOT NULL,
        middle_init   VARCHAR2(100 BYTE),
        last_name     VARCHAR2(100 BYTE) NOT NULL,
        title         VARCHAR2(100 BYTE),
        email         VARCHAR2(256 BYTE) NOT NULL,
        id            NUMBER
            GENERATED ALWAYS AS IDENTITY ( START WITH 1 MAXVALUE 10000 CACHE 20 ORDER )
        NOT NULL,
        street1       VARCHAR2(100 BYTE) NOT NULL,
        street2       VARCHAR2(100 BYTE),
        street3       VARCHAR2(100 BYTE),
        city          VARCHAR2(100 BYTE) NOT NULL,
        state         VARCHAR2(2 BYTE) NOT NULL,
        zip           VARCHAR2(12 BYTE) NOT NULL,
        country       VARCHAR2(100 BYTE),
        ace           NUMBER(*,0),
        bio_pic       BLOB
    )