使用sql语句SELECT * FROM ChPoint WHERE Index>=1547 AND Index<=2306; 查询时,检查了好几遍语句也没发现有错误,试了 SELECT * FROM ChPoint WHERE Index?BETWEEN 1547 AND 2306;? 一样报错near "Index":syntax erro
经过坚持不懈的查询,终于发现Index是sqlite的保留关键字,如果字段中使用了Index,那么查询这个字段时不能直接使用,需要用中括号括起来再用,比如此处语句写为以下方式就不会再报错:
SELECT * FROM ChPoint WHERE [Index] BETWEEN 1547 AND 2306;? 或者
SELECT * FROM ChPoint WHERE [Index]>=1547 AND [Index]<=2306;
ABORT CREATE FROM NATURAL ROLLBACK ACTION CROSS
FULL NO ROW ADD CURRENT_DATE GLOB NOT SAVEPOINT
CURRENT_TIME GROUP SELECT ALL CURRENT_TIMESTAMP
HAVING NULL SET ALTER DATABASE IF OF TABLE ANALYZE
DEFAULT IGNORE OFFSET TEMP AND DEFERRABLE IMMEDIATE
ON TEMPORARY AS DEFERRED IN OR THEN ASC DELETE INDEX
ORDER TO ATTACH DESC INDEXED OUTER TRANSACTION?
AUTOINCREMENT DETACH INITIALLY TRIGGER BEFORE DISTINCT?
INNER PRAGMA UNION BEGIN DROP INSERT PRIMARY UNIQUE UPDATE?
QUERY INSTEAD EACH BETWEEN BY ELSE INTERSECT RAISE USING?
VACUUM RECURSIVE INTO END CASCADE CASE ESCAPE IS?
REFERENCES VALUES VIEW REGEXP ISNULL EXCEPT CAST CHECK?
EXCLUSIVE JOIN REINDEX VIRTUAL WHEN RELEASE KEY EXISTS?
COLLATE COLUMN EXPLAIN LEFT RENAME WHERE WITH LIKE FAIL?
COMMIT CONFLICT FOR LIMIT RESTRICT WITHOUT RIGHT MATCH?
FOREIGN CONSTRAINT