On 8/25/15, Tim Streater <tim at clothears.org.uk> wrote: > On 25 Aug 2015 at 19:37, Richard Hipp <drh at sqlite.org> wrote: > >> On 25/8/15, Simon Slavin <slavins at bigfraud.org> wrote: >>> >>> "If there is no AS clause then the name of the column is unspecified and >>> may >>> change from one release of SQLite to the next." > >> Heed this warning!!! >> >> And yet, there are countless tens of thousands of applications in >> circulation that have ignored this warning and depend on the >> (unsupported) behavior of whatever version of SQLite they were >> originally developed on. So the reality is that we are extremely >> careful not to change the result column naming algorithms, for fear of >> breaking billions of cellphone apps. > > So how does that work with: > > create table newtable as select * from oldtable; > > Does that mean that, in principle, I could have any random set of column > names for my new table? >
Yeah. That's a bummer, isn't it.... But in practice, our default column name chooser algorithm does what you want here, and as I stated before, we are in no hurry to change it. -- D. Richard Hipp drh at sqlite.org