On 13 Jul 2014, at 2:34pm, RSmith <rsm...@rsweb.co.za> wrote: > If you need the returned names to be exactly something specific, then you > need to use the "AS" directive.
You can even put the 'AS' into the VIEW: sqlite> .headers ON sqlite> .mode columns sqlite> CREATE TABLE TestA (one TEXT, two TEXT); sqlite> INSERT INTO TestA VALUES ('a','b'); sqlite> INSERT INTO TestA VALUES ('c','d'); sqlite> SELECT * FROM TestA; one two ---------- ---------- a b c d sqlite> CREATE VIEW TestB AS SELECT * FROM TestA; sqlite> SELECT * FROM TestB; one two ---------- ---------- a b c d sqlite> CREATE VIEW TestC AS SELECT one AS oneone, two AS twotwo FROM TestA; sqlite> SELECT * FROM TestC; oneone twotwo ---------- ---------- a b c d sqlite> CREATE TABLE TestD AS SELECT * FROM TestC; sqlite> SELECT * FROM TestD; oneone twotwo ---------- ---------- a b c d Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users