> Is there a command > similar to 'use database' (mysql) in sqlite3 so that I can make a > particular database as default? (I don't find such command, but please > let me know in case if I miss anything.)
Yes. It is sqlite3_open() in C API. And if you use command line utility then you should pass the name of database file that you want to make default in the command line. You cannot switch default databases while connection is open. In fact "connection" in SQLite and "connection" in MySQL are completely different things, so there's nothing inappropriate in such SQLite's behavior. Pavel On Tue, Jul 6, 2010 at 12:00 PM, Peng Yu <pengyu...@gmail.com> wrote: > Hi, > > I can attach a database to the current session. But I have to > explicitly specify the table name to refer to any tables in it (such > 'create_index' in 'create_index.sqlite_master'). Is there a command > similar to 'use database' (mysql) in sqlite3 so that I can make a > particular database as default? (I don't find such command, but please > let me know in case if I miss anything.) > > sqlite> attach database 'create_index.db' as create_index; > sqlite> select * from create_index.sqlite_master; > > -- > Regards, > Peng > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users