找到了,哈哈
With this table, the statementINSERT INTO t1 VALUES(NULL,123);is logically equivalent to saying:INSERT INTO t1 VALUES((SELECT max(a) FROM t1)+1,123);For SQLite version 2.2.0 through 2.3.3, if you insert a NULL into an INTEGER PRIMARY KEY column, the NULL will be changed to a unique integer, but it will a semi-random integer. Unique keys generated this way will not be sequential. For SQLite version 2.3.4 and beyond, the unique keys will be sequential until the largest key reaches a value of 2147483647. That is the largest 32-bit signed integer and cannot be incremented, so subsequent insert attempts will revert to the semi-random key generation algorithm of SQLite version 2.3.3 and earlier.

解决方案 »

  1.   

    想再问一下mysql可以使用SELECT DATE_ADD('2005-09-17',INTERVAL 1 DAY) AS nextday来取得明天的日期,sqlite呢,要怎么得到。或者另外写个什么样的函数来取得?
      

  2.   

    datetime() 遵循strtotime函数的参数格式
    例:select datetime('now', '1 year')strftime()
    例:strftime('%Y-%m-%d', 'now')
      

  3.   

    谢谢 :)
    有没有sqlite的手册呢?
      

  4.   

    SQLite开发文档: http://www.sqlite.org/docs.html
    我写的开发文章: http://blog.csdn.net/heiyeshuwu/archive/2005/08/05/446810.aspx
      

  5.   

    官方网站那个我知道,而且你blog里的也是一些入门的。我是想看有没有像mysql的chm手册,想知道一些sqlite的函数。不过还是谢谢你!