I think your both e.q. DDL
and DML
statement is incorrect. Try to replace yours with following:
String createQuery = "CREATE TABLE IF NOT EXIST DIARY ("
+ "id integer primary key, "
+ "mood text, "
+ "weather text, "
+ "content text, "
+ "time text" + ")";
Here:
INSERT INTO DIARY VALUES(mood,weather,text,strDate,NULL);
Your origin create statement create PK
column as last column and here in your insert statement you are trying to insert NULL
as PK
that is not allowed and it doesn't make sence since PK
is unique identifier of each row.