sql - Alter auto-generated sequence -


i use create auto-incremented id columns:

  id  bigserial                                -- psql   id  bigint generated default identity  -- hsql 

now in unit tests i'd reset sequences between tests.

is possible? target postgresql , 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


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -