Subject | Re: [firebird-support] select column if it exists |
---|---|
Author | Elmar Haneke |
Post date | 2017-10-09T08:36:20Z |
> Is there a way to include a column in a SELECT but substitute a value ifYou can read the list of fields available in advance and modify your
> it doesn't? I need my code to work with different versions of my db schema.
>
> eg I want to SELECT A, B, C, ... but C might not exist.
>
> SELECT * would work of course, except it will fetch a bunch of columns I
> don't need.
query ommitting missing columns.
Elmar