After fixing the errors in the script (strings are quoted with single quotes, not double quotes):
sqlite> .headers on sqlite> create table addresses( id, name ); sqlite> create table users( id, address_id, name ); sqlite> create table pets(id, user_id, name ); sqlite> sqlite> insert into addresses(id,name) values ( 1, 'there' ); sqlite> insert into users(id,address_id,name) values ( 1, 1, 'bob' ); sqlite> insert into pets(id,user_id,name) values ( 1,1, 'odif' ); sqlite> sqlite> select * from users user join addresses address on address.id=user.address_id ...> join pets pet on pet.user_id=user.id; id|address_id|name|id|name|id|user_id|name 1|1|bob|1|there|1|1|odif sqlite> pragma full_column_names=1; sqlite> pragma short_column_names=0; sqlite> select * from users user join addresses address on address.id=user.address_id ...> join pets pet on pet.user_id=user.id; user.id|user.address_id|user.name|address.id|address.name|pet.id|pet.user_id|pet.name 1|1|bob|1|there|1|1|odif sqlite> Note that the short_column_names and full_column_names pragma's are deprecated even though highly useful. You have to turn off short_column_names (the default) in order for full_column_names to have any effect. Note that you SHOULD be using AS to name your columns, if you care about column names, and not relying on implementation details. -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users