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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -