you can use "=" for straight string comparisons, there's also LIKE, GLOB, REGEXP and MATCH (if you are using a free-text search table/fts3) - what is your use case? Oh, and btw, performance is improved by SQLiteStatements - not tweaking rawQuery with parameters - that just prevents injections.
For better performance, you should use rawQuery method with selectionArgs which is faster and more secure against adding directly data to statement. So try it like this
Cursor cursor = db.rawQuery("SELECT id,lastname FROM people WHERE lastname = ?; ", new String[] {"John Kenedy"});
LIKE,GLOB,REGEXPandMATCH(if you are using a free-text search table/fts3) - what is your use case? Oh, and btw, performance is improved by SQLiteStatements - not tweakingrawQuerywith parameters - that just prevents injections.