NOTE: For the first time in android, call getWritableDatabase or getReadableDatabase to execute the OnCreate () method. If the table does not exist in the database, we recommend that you create the table: we recommend that you add the judgment statement CREATETABLEIFNOTEXISTS in SQL when creating a table. "Problem description: 1. related tables in the database have been created. 2. the table has been added
NOTE: For the first time in android, call getWritableDatabase or getReadableDatabase to execute the OnCreate () method. If the table does not exist in the database, we recommend that you create the table: we recommend that you add the statement create table if not exists in SQL when creating a TABLE. "Problem description: 1. related tables in the database have been created. 2. the table has been added
Note:
In android, The getWritableDatabase or getReadableDatabase method is called for the first time to execute the OnCreate () method. If the table does not exist in the database, the create operation is performed.
Suggestion:
We recommend that you add the statement "create table if not exists" to the SQL statement when creating a TABLE.
Problem description:
1. related tables have been created in the database.
2. Data already added to the table
It is always null when you look up the total number of tables...
Solution:
1. The tracking log finds that OnCreate () will be re-executed for each query and if not exists in the SQL statement is invalid. Finally, it finds that:
GetWritableDatabase performs the query operation.