SELECT EXISTS(SELECT * FROM sqlite_master WHERE type = 'table' AND
Name = 'MyTableName');

returns 1 or 0 for True or False

Substute your own table name for MyTableName.


On Jul 29, 7:07 am, jay ram <[email protected]> wrote:
>     I'm working with SQLiteDatabase. I need to find out whether a table
> named 'table1' exists in my database or not, programmatically.
> Is there any method to find that?
>
> Thanks in advance.
> --
>
> Regards,
>
> T.JAYARAM

--~--~---------~--~----~------------~-------~--~----~
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