GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Generate create table script does not work properly when a column is auto increment and primary key · Issue #29 · squirrel-sql-client/squirrel-sql-code

Generate create table script does not work properly when a column is auto increment and primary key #29

New issue
Copy link
New issue
Copy link
Open
Open
Generate create table script does not work properly when a column is auto increment and primary key#29
Copy link

Description

@MitchellPuls
MitchellPuls
opened on Feb 27, 2024
Issue body actions

When you create a table that has a column that is both auto increment, and a primary key, and you afterwards try to export a create table script from it, it will remove the auto increment part of it.

Steps to reproduce:

  1. Create a table: CREATE TABLE TEST (TEST INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1) PRIMARY KEY);
  2. Verify table in objects view > columns
    image
  3. Right click table TEST > Scripts > Create table script

Expected result: Create table query with a column with both auto increment, and primary key properties
Actual result: Create table query with only a primary key property

This is a property I found now, do not know if other column properties have the same issue

Activity

  1. gerdwagner commented on Mar 2, 2024

    @gerdwagner
    gerdwagner
    on Mar 2, 2024
    Member
    More actions

    There are a variety of mechanisms to define an auto increment column. These mechanisms are not limited to different syntaxes in the column definition clause. For details see
    https://www.w3schools.com/sql/sql_autoincrement.asp

    That is why we do not support it in SQuirreL's table scripting.

  2. gerdwagner
    added a commit that references this issue on Mar 2, 2024

    Refactorings done during investigations for GitHub issue

    91ca488
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.