Why do you consider this a "best practice"? I've used the fullselect form
extensively with no issues. If it's because, in my case, it's not possible
to use the fullselect form, then I would consider the VALUES() form to be
the fall-back. I can see it if it's because of adding columns to a table
in the future and not impacting existing applications that use the
fullselect form, but the tables in this application are used only in a
narrow set of programs and it actually is necessary for them to handle any
added columns automatically.

But, since it does not appear to be possible to use the fullselect form,
I'm going to have to build a column list that will be used in generating
the Insert statement.

- Dan

On Thu, Aug 17, 2017 at 3:13 PM, Charles Wilt <charles.wilt@xxxxxxxxx>

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 <...>

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 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].