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 specific criteria that we want to insert, delete, or select data from
- FROM: This is used to specify a table or column name in a database
Note
There are many more SQLite keywords than this, and for a full list of keywords, take a look at https://sqlite...