콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4317 화면

Friends,

I created a sequence with prefix TM..

I created some files and it generates the following sequences,

   TM001

   TM002

   TM003

Then i delete them all..

So now i want to create files with seq TM001

So i go to settings>Technical>Sequences&Identifiers>Sequences

       Next Number : 1

But when i save it till remain as 4(Not Updated)

Can u help me

Thanks

아바타
취소
베스트 답변

You need to reset the counter in postgres for this.

ALTER SEQUENCE $yoursequence RESTART

should do the trick.

아바타
취소
작성자

ddnt get..can u plz xplain some more

작성자

Is it q query?After this can i edit it through Settings?

It's a query. Run it on your db.

작성자

what i put in the place of $..I put my sequence name ..but it cause the following error,,ERROR: syntax error at or near "$"

Your sequence should be there, something like ir_sequence_0035 or so. You will have to figure out which one it is for yourself.

작성자

I tried this,ALTER SEQUENCE ir_sequence_TM:0001 RESTART ..but the same error

Perhaps it would be best for you to first read the postgres documentation to see what went wrong.