The SQL syntax primer

Before you learn how to use SQLite with Android, you first need to learn the basics of how to use SQLite in general in a platform-neutral context.

Let's look at some example SQL code that could be used on an SQLite database directly, without any Java or Android classes, and then we can more easily understand what our Java code will doing later.

The SQLite example code

SQL has keywords much like Java that cause things to happen. Here is a flavor of some of the SQL keywords that we will be using soon:

  • INSERT: This allows us to add data to the database
  • DELETE: This allows us to remove data from the database
  • SELECT: This allows us to read data from the database
  • WHERE: This allows us to specify the parts of the database that match a ...

Get Android Programming for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.