2021
01-08
01-08
PostgreSQL 序列增删改案例
创建序列CREATESEQUENCEifnotexiststest_mergetable_id_seqINCREMENT1MINVALUE1MAXVALUE999999999START1CACHE1;//或者:createsequenceifnotexiststest_mergetable_id_seqincrementby1minvalue1nomaxvaluestartwith1;指定序列(给表的主键指定创建好的序列)altertabletest_mergetablealtercolumn"i_id"setdefaultnextval('test_mergetable_id_seq');设置序列自增长从当前最大值开始SELECTset...
继续阅读 >