为什么sqlfiddle说这个sql不工作?

时间:2017-03-12 23:53:41

标签: android sql sqlite syntax sqlfiddle

http://sqlfiddle.com/#!5/5cb3a/1

我使用android sqlite,所以我使用db.execsql()形式的非格式化的sql;

我已将问题缩小到了一线:

INSERT INTO pains (painlocation VARCHAR , painlevel INT(1) , starttime VARCHAR , endtime VARCHAR , symptoms VARCHAR , triggers VARCHAR , medications VARCHAR , othertreatments VARCHAR , notes VARCHAR) VALUES (Eyes , 8 , 12:00 , 12:01 , None , Eyes, None, None , None);

请帮帮我。每次它只是在android控制台中说出来,无论检查多少错误并阻止我输入的代码,我总是得到错误。:

Caused by: android.database.sqlite.SQLiteException: near "VARCHAR": syntax error (code 1): , while compiling: INSERT INTO pains (painlocation VARCHAR , painlevel INT(1) , starttime VARCHAR , endtime VARCHAR , symptoms VARCHAR , triggers VARCHAR , medications VARCHAR , othertreatments VARCHAR , notes VARCHAR) VALUES (Eyes , 8 , 12:00 , 12:01 , None , Eyes, None, None , None);

0 个答案:

没有答案