On Mon, May 23, 2016 at 4:49 PM, Steve Schow <steve at bstage.com> wrote:
> My suggestion is add the extra columns you need to the view, then when you > make a query against that view, only specify the more limited set of output > columns you want in the final output > SQLite almost supports what's needed, but only for VIRTUAL tables. [1] The HIDDEN trick doesn't work in tables (parses fine, but ignored), and doesn't work in views (doesn't parse, at least in 3.10.2 when I tried). If that trick was extended to views, as in create view v (col1, col2, col3 HIDDEN) as select ... then Balaji could have `select * from v` only return col1 and col2, yet still be able to filter/sort on col3. i.e. the cake and ... --DD PS: I actually thought HIDDEN was supported for tables, but sadly it isn't apparently. PPS: Oracle12c uses INVISIBLE for such columns. See [2]. [1] https://www.sqlite.org/vtab.html#hiddencol [2] http://www.oracle.com/technetwork/articles/database/invisible-columns-odb12c-2331522.html