I have tried the method given by Mark in the following way:

public final static String SQL_GET_ALL_TABLES = "SELECT name FROM " +
                "sqlite_master WHERE type='table' ORDER BY name";
dataBase.execSQL(this.SQL_GET_ALL_TABLES, tablenames);

But I got exception while running dataBase.execSQL. I don't know where
the mistake exists. Could anyone tell me?

On 7月29日, 上午9时25分, Mark Murphy <mmur...@commonsware.com> wrote:
> guishenl...@gmail.com wrote:
> > I want to get the tables programmatically not in the command line. And
> > the database is created by myself not the contact database.
>
> http://www.sqlite.org/faq.html#q7
>
> "So to get a list of all tables in the database, use the following
> SELECT command:
>
>     SELECT name FROM sqlite_master
>     WHERE type='table'
>     ORDER BY name;
> "
>
> If you have questions on SQLite in general, use SQLite resources, like
> sqlite.org.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to