Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Data Persistence CRUD Operations with SQLite Deleting Data

Zubeyr Aciksari
Zubeyr Aciksari
21,074 Points

HOORAY! Rover has been found! We can now delete this entry from our database. As usual, assume you already have a variab

Can someone please send the answer, i am stuck in here.. Thanks!

"HOORAY! Rover has been found! We can now delete this entry from our database. As usual, assume you already have a variable named 'database'. Use "PETS_TABLE" as the table name, the provided where clause, and check the documentation for help on the appropriate method."

CodeChallenge.java
String clause = String.format("%s=%s", "name", "Rover");

/* Add your code here! 
 * Assume you already have a variable named 'database'.
 */

3 Answers

Dan Johnson
Dan Johnson
40,532 Points

The method you are looking for is delete. You can find out how to use it here in the documentation.

Edvards Valbahs Thanks