Thanks to everyone. I have always prefixed table names with the db name when I have attached dbs myself but I didn't appreciate that the temp database was 'attached' as such as well. In a nutshell then, if you only use one database then you can refer to tables with no prefix (although you can prefix with main if you like). But as soon as you either attach another db or use a temp database then it is wise to prefix all the tables with the database name to avoid any issues that might crop up with table names inadvertantly or deliberately being the same. Thanks, I've learnt something!
-- View this message in context: http://sqlite.1065341.n5.nabble.com/How-to-select-from-a-temp-table-with-same-name-as-a-main-table-tp69470p69544.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users