I am working on an android application using XAMARIN , C# and trying to create a table using SqLite database but to avoid redundancy I want to check whether a particular table exists or not. I have tried many solutions available online but nothing worked.
Purvi Barot
Software Engineer
This query will return the list of tables in the database :
SELECT * FROM sqlite_master WHERE type = 'table';You can filter it down to a single row for an "exists" check :
SELECT * FROM sqlite_master WHERE type = 'table' AND tbl_name = 'xyz';