I use SELECT lastval() to get wrong serial id after truncated the table.
when I truncate the table, I use SELECT lastval(), I got the wrong ID/
Following is the standard way to reset sequence:
truncate table table_name restart identity;
but in some version & platform, it's syntax error,
in that case, you can truncate without reset sequence, and alter the sequence with another sql, try this:
truncate table table_name;
alter sequence seq_name start 1;