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

This applies to INSERT too...

Don't do

INSERT INTO mytable
SELECT <...>

Instead, use

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

Charles



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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 by midrange.com 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].