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.
Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)