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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -