找到了,哈哈
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.
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.
例:select datetime('now', '1 year')strftime()
例:strftime('%Y-%m-%d', 'now')
有没有sqlite的手册呢?
我写的开发文章: http://blog.csdn.net/heiyeshuwu/archive/2005/08/05/446810.aspx