Skip to content

Add support for GENERATED Columns #1296

@altmannmarcelo

Description

@altmannmarcelo

Description

Add support for https://dev.mysql.com/doc/refman/8.4/en/create-table-generated-columns.html

Example functions:

  field_c int GENERATED ALWAYS AS (((nullif(field_a,_utf8mb4'') is null) and (nullif(field_b,_utf8mb4'') is null))) STORED,
  field_a tinyint(1) GENERATED ALWAYS AS (if((((field_b = _utf8mb4'') or (field_c is null)) and (field_d is null) and (field_f is null) and (field_g <> _utf8mb4'') and (field_h is not null)),_utf8mb4'1',_utf8mb4'0')) STORED,

Change in user-visible behavior

Requires documentation change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions