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?

Doing this properly is also going to mean that, for safety, I've got 306 select 
statements to fix up in my application. It's gonna be a bit dull if I have one 
where I select 20 named columns from a table and have to change such as:

  select absid, firstname, lastname, phone, ...

to:

  select absid as absid, firstname as firstname, lastname as lastname, phone as 
phone, ...

Recipe for typos there, ISTM. Grumble, grumble.

--
Cheers  --  Tim

Reply via email to