It depends if you want all the tables programmatically or if you can
do it in the command line. Sujay's answer was from the command line.
So starting a few steps back, you type:


> adb shell
# cd /data/data
# cd com.android.providers.contacts
# cd databases
# sqlite3 contacts.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables


That will get you all the tables in the contacts database, for
example. If that doesn't answer your question, let me know more about
what you need and I'll try to help.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.




On Jul 28, 12:59 am, "[email protected]" <[email protected]>
wrote:
> Thank you for answering!
> But I didn't catch your real meaning.
> Could you give me some exact code to show your point?
>
> On 7月28日, 下午3时25分, Sujay Krishna Suresh <[email protected]>
> wrote:
>
>
>
> > .tables is the sql instruction to retrieve all the tables in the db.
> > try executing it asa sql statement with rawQuery.
>
> > On Tue, Jul 28, 2009 at 12:45 PM, [email protected] <
>
> > [email protected]> wrote:
>
> > > Hi all,
> > >      I'm working at an application about SQLite database. I have
> > > inserted some table in an database file.  But I don't know how to get
> > > all the tables' name using code. For example, I defined a database
> > > object
> > > SQLiteDatabase dataBase = SQLiteDatabase.openOrCreateDatabase(
> > >                        getDatabasePath("Mydatabase"), null);
> > > and how can I get all the table names stored in the database file
> > > "Mydatabase". Counld anyone give me some code to help me?
> > > Thank you in advance!
>
> > --
> > Regards,
> > Sujay
> > Joan 
> > Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html>
> > - "I, Joan Crawford, I believe in the dollar. Everything I earn, I
> > spend."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to