sqlite select tables

Feb 25, 2009 at 12:48am

sqlite select tables


Having some fun with sqlite in maxmsp. Thanks for tutorial!
A lot of requests are working BUT I cannot have a list of the names of the tables themselves.

I have try
exec “show tables”
exec “.tables”
function get_tables(){
var database=arguments[0];
exec(“SELECT * FROM ‘”+database+”‘ WHERE type=’table’ ORDER BY name”);

No success…
Need a little help.
Thank you

Feb 25, 2009 at 3:25pm

small solution.
I generate tables names trough a autopopulate umenu…

Feb 25, 2009 at 4:41pm

You can do that using the sqlite_master table.

SELECT * FROM sqlite_master

It’s explained in the Querying the SQLITE_MASTER table paragraph.

Feb 25, 2009 at 5:12pm

Thanks it works!
Vive ej!


You must be logged in to reply to this topic.