Best practice is not to use SELECT *, always use an explicit column list.

This applies to INSERT too...

Don't do

SELECT <...>

Instead, use

INSERT INTO mytable (col1, col2, col3, <...>)
SELECT <...>


On Thu, Aug 17, 2017 at 1:01 PM, Dan <dan27649@xxxxxxxxx> wrote:

Is it possible to use the SQL "INSERT using fullselect" form when one of
the columns is defined with "GENERATED ALWAYS AS IDENTITY"? If so, how
does one avoid / omit such a column in the INSERT statement? I'm trying to
avoid having to use the "INSERT using VALUES" form, as this complicates the
dynamic creation of the INSERT statement.

FWIW, I'm on v7r1 and the application is a CLLE which uses the RUNSQL
command to perform the INSERT.

- Dan
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contact support@xxxxxxxxxxxx for any subscription related

Help support by shopping at with our affiliate

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].