Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Cursor cursor = db.rawQuery("SELECT id,lastname FROM people WHERE lastname='John Kenedy'; ",null);
それは比較の正しい使い方Stringですか?Stringいいえの場合、データベース内の値を比較するにはどうすればよいですか?
String
パフォーマンスを向上させるには、データをステートメントに直接追加することに対して、より高速で安全なrawQuery方法を使用する必要があります。selectionArgsじゃあこんな感じでやってみる
rawQuery
selectionArgs
Cursor cursor = db.rawQuery("SELECT id,lastname FROM people WHERE lastname = ?; ", new String[] {"John Kenedy"});