I use this to create auto-incremented id columns:
id BIGSERIAL -- psql
id BIGINT GENERATED BY DEFAULT AS IDENTITY -- hsql
Now in unit tests i'd like to reset those sequences between tests.
Is this possible? I target PostgreSQL and HSQLDB
TRUNCATE table RESTART IDENTITY;
http://www.postgresql.org/docs/9.2/static/sql-truncate.html
http://hsqldb.org/doc/guide/dataaccess-chapt.html#dac_truncate_statement