sqlite ÖÐ CREATE TABLE table1 ( id integer primary key autoincrement, name text default '', [index] integer default ROWID )
ÓÐûÓÐÀàËƵŦÄÜ£¬Èà index µÄֵĬÈϵÈÓÚid£¬±ÈÈç insert into table1 (id,name) values (null,'µÚÒ»ÐÐ'); insert into table1 (id,name) values (null,'µÚ¶þÐÐ');
ÎÒÏ£Íû½á¹ûÊÇ id name index 1 µÚÒ»ÐÐ 1 2 µÚ¶þÐÐ 2
ÄÜʵÏÖÂð£¿
Ò»¶¨ÒªÓõ½´¥·¢Æ÷ºÍ´æ´¢¹ý³ÌÂ𣿲»ÄÜÖ±½ÓÉèÖóÉĬÈÏÖµÂð ºÇºÇ£¬²»ÄÜ£¬²âÊÔÁËһϲ»ÐÐ àÅ£¬ÖªµÀÁË£¬¹ûÈ»ÊDz»ÐÐµÄ ²âÊÔ¿ÉÒÔÕâÑù £º insert into table1c values (null,'µÚÒ»ÐÐ',(select rowid from table1c));