android - Cant execute delete query properly using rawQuery -
i want deleting rows of table info
comparing table type
, code goes below. not getting error or exception still unable delete data. please suggest me
string query = "delete info _id in " + "( select a._id " + " info a, type b," + " a.t_id = b._id , b.type_name = 'petrol' )"; try{ database.rawquery(query,null); }catch (exception e){ e.printstacktrace(); }
the method sqlitedatabase.rawquery()
meant querying --> select statement.
to modify data raw sql, need use sqlitedatabase.execsql()
.
Comments
Post a Comment