Get list of tables spatialite

465 views
Skip to first unread message

Véronique

unread,
Nov 20, 2013, 9:12:17 AM11/20/13
to spatiali...@googlegroups.com
Dear List,
 
I'm looking for the spatialite query which gives me a list of table names present in the database.
 
thanks,
Véronique
 

 

 
 
 

 

 
 
 

a.fu...@lqt.it

unread,
Nov 20, 2013, 9:24:42 AM11/20/13
to spatiali...@googlegroups.com
> I'm looking for the spatialite query which gives me a list of table
> names present in the database.
>
>

Hi Véronique,

there are several options available; e.g. if you are using
the sqlite3 or spatialite CLI tools you simply have to
execute this "dot macro" command:
.tables

a more generic approach based on pure SQL is the one to
query the SQLite's own metable catalog e.g.

SELECT tbl_name FROM sqlite_master
WHERE type = 'table';

please read the appropriate documentation:
http://www.sqlite.org/faq.html#q7

bye Sandro

Véronique

unread,
Nov 22, 2013, 5:57:28 AM11/22/13
to spatiali...@googlegroups.com
Dear Sandro,
 
 I should have been more clear about this query as I had no problems with the gui or commandline query, only with the implementation of the query in my c# code.
Problem is solved as I had made a mistake in my c# coding and not the query itself.
 
sorry,
Véronique 
 

Op woensdag 20 november 2013 15:12:17 UTC+1 schreef Véronique:
Reply all
Reply to author
Forward
0 new messages