Rename table in sqlite

Viewed 8198

I am trying to rename a table in my app's sqlite database. For that I am using the following command:

ourDatabase.rawQuery("ALTER TABLE " + oldName + " RENAME TO " + newName,
                null);

where oldName is old name of the table, newName is the new name of table and ourDatabase is an instance of SQLiteDatabase. But this is not working.

What's the mistake ?

Thanks.

2 Answers
Related