DB/Postgresql
biggint칼럼으로 시퀀스를 쓸때 초기화하는 명령어?
fabxoe
2020. 2. 13. 21:55
어차피 이름있는 시퀀스이다. 테이블을 살펴보면 이름을 알 수 있다.
select * from aiops_auth_info_auth_id_seq
select currval('aiops_auth_info_auth_id_seq'::regclass)
select setval('aiops_auth_info_auth_id_seq'::regclass,5)
이런 명령어들이 먹힌다.
https://dbrang.tistory.com/784
[PGS9.2] Sequence 활용하기
/******************************************************************************************** -- Title : [PGS9.2] Sequence 활용하기 -- Reference : dbrang.tistory.com -- Key word : sequence 시퀀스 **..
dbrang.tistory.com