My original email was correct: The statement in the book "*You can truncate the table, i.e., delete all records and reset the counter of the id*." is not correct. The id-counter does not get reset during truncate. That is the case with Postgresql. I have not tested that on other databases.
The book is correct far as SQLITE is concerned, but not with Postgresql. I just did another test on Postgresql: In[14]: l = db(db.tut).select() In [15]: l.last().id Out[15]: 4487 In [16]: db.tut.truncate() In [17]: db.commit() In [18]: l = db(db.tut).select() In [19]: len(l) Out[19]: 0 In [22]: db.tut.import_from_csv_file(open('/home/js/Downloads/db_tut.csv', 'r')) In [23]: l = db(db.tut).select() In [24]: len(l) Out[24]: 1495 In [25]: l.first().id Out[25]: 4488 Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)