On Wed, 20 Aug 2008 06:33:17 +0530, Mrinal wrote: >>Try: >>PRAGMA [database.]table_info(table-name); > >> ( Kees Nuyt > >Thankyou Kees for the solution
yw. >But, I am facing another problem [...] As Dennis said, that looks like a bug. I just confirmed SQLite 3.6.0 behaves the same way. Apparently temp is only treated like an attached database for specific (syntactical) purposes. Its schema is maintained in the main database, in the sqlite_temp_master table. In my view, it's not very common to give two different tables in the same logical database (main) the same name. sqlite_version():3.6.0 .bail off create table trial (col_main); select * from sqlite_master; table|trial|trial|2|CREATE TABLE trial (col_main) pragma main.table_info(trial); 0|col_main||0||0 create temp table trial (col_temp); select * from sqlite_temp_master; table|trial|trial|2|CREATE TABLE trial (col_temp) pragma main.table_info(trial); 0|col_temp||0||0 attach 'tmp/test_34.db3' as db34; create table db34.trial (db34_main); select * from db34.sqlite_master; table|trial|trial|2|CREATE TABLE trial (db34_main) pragma db34.table_info(trial); 0|db34_main||0||0 .databases seq name file --- ----------- ----------------------------- 0 main \opt\research\tmp\test_33.db3 1 temp 2 db34 \opt\research\tmp\test_34.db3 pragma main.table_info(trial); 0|col_temp||0||0 pragma temp.table_info(trial); 0|col_temp||0||0 pragma db34.table_info(trial); 0|db34_main||0||0 -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users