SQL - reset or modify counter

By kimot, 30 March, 2023

If you have defined autoincrement field in your table GENERATED ALWAYS AS IDENTITY You can find out actual value :

select max(field_name) from table_name ;

You can change  autoincrement value :

alter table table_name alter column field_name restart with 1;