Try Create index t2.idx on link (...)
Which is what the syntax diagram would recommend. If you ask SQLite to create an index in t2, it will figure out that the table needs to be in t2 too. -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Chris Peachment Gesendet: Sonntag, 11. Juni 2017 17:22 An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Betreff: [sqlite] Unable to create index on attached database Hello All: Is this a bug or am I doing something wrong? Note: neither test.db nor t2.db exist prior to this test. $ sqlite3 test.db SQLite version 3.19.2 2017-05-25 16:50:27 Enter ".help" for usage hints. sqlite> create table account (id integer primary key, idParent integer); sqlite> attach database 't2.db' as t2; create table t2.link (idParent sqlite> int, idChild int); create index t2.idx on t2.link sqlite> (idChild,idParent); Error: near ".": syntax error sqlite> create index idx on t2.link (idChild,idParent); Error: near ".": syntax error sqlite> create index idx on link (idChild,idParent); Error: no such table: main.link sqlite> Regards, Chris Peachment _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users