full column names in 3.2.7

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

full column names in 3.2.7

Fanda Vacek
Hi,

it seems, that ver 2.3.7 does not report the column names properly if one  
use joined select. Documntation says:

... Normally, such result columns are named  
<table-name/alias>.<column-name> if the SELECT statement joins two or more  
tables together, or simply <column-name> if the SELECT statement queries a  
single table. ...

but if I try this:

sqlite> pragma short_column_names=0;
sqlite> pragma full_column_names=0;
sqlite> .header on
sqlite> create table t1 (id);
sqlite> insert into t1 values (1);
sqlite> insert into t1 values (2);
sqlite> insert into t1 values (3);
sqlite> select * from t1;
id
1
2
3
sqlite> select * from t1 left join t1 as t2 on t1.id=t2.id;
id|id
1|1
2|2
3|3
sqlite>

column headers are id|id and not t1.id|t2.id

Is it a bug or did I read something wrongly?

Fanda


Reply | Threaded
Open this post in threaded view
|

RE: full column names in 3.2.7

rlodina
Hi,

This pragma works for me (3.2.7):

sqlite> pragma short_column_names=0;
sqlite> pragma full_column_names=1;
sqlite> .header on


Set short_ = 0 and full_ = 1

You can check the curent value of pragma directive with: pragma <directive_name>


sqlite> pragma short_column_names;
0  // -> display of short column name deactivated


sqlite> pragma full_column_names;
1  // -> display of full column name ACTIVATED

Regards
Radu Lodina