Ignore GENERATED ALWAYS AS TRANSACTION START ID columns

37 views
Skip to first unread message

M Oenbrink

unread,
Jun 19, 2023, 8:27:29 AM6/19/23
to SQL Workbench/J - DBMS independent SQL tool
When editing rows in a table, the UI setting (checkbox):
Tools->Options->SQL Generation->Ignore Autoincrement columns for Insert
allows bypass of some dbms auto-maintained columns from Insert statements.

DB2 supports additional auto-maintained columns options, eg:
GENERATED ALWAYS AS TRANSACTION START ID
which auto maintains a timestamp of the row's last update.

Please add coverage of this sql syntax to the Ignore for Insert checkbox ,
so that the table editor can also Insert rows into tables with such columns.

Thomas Kellerer

unread,
Jun 19, 2023, 3:07:02 PM6/19/23
to sql-wo...@googlegroups.com
Good point, thanks.

I will exclude generated columns like that if the option is enabled.

M Oenbrink

unread,
Jun 19, 2023, 4:33:04 PM6/19/23
to SQL Workbench/J - DBMS independent SQL tool
Thanks for feedback Thomas.
fyi, I think in db2 you can check catalog column syscat.columns.generated for value 'A' (stands for 'ALWAYS').

Thomas Kellerer

unread,
Jun 20, 2023, 2:27:36 AM6/20/23
to sql-wo...@googlegroups.com
Thanks. I already retrieve that information from there.

It's just not used when building the INSERT statements
Reply all
Reply to author
Forward
0 new messages