WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

How to use custom sequence name with GENERATED BY DEFAULT AS IDENTITY #7948

@MarvinKlein1508

Description

@MarvinKlein1508

Hi

when running this script in Firebird 4 it generated a new sequence for the table.

CREATE TABLE USERS (
  user_id INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
  username VARCHAR(50)
);

The sequence is always named RDB$(number of tables created by GENERATED BY DEFAULT AS IDENTITY)
grafik

However I want to be able to see which sequence is for what in my database so I want to use a custom name for this for example GEN_USERS_USER_ID

Is there any way to achieve this or to rename the generated sequence?

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