0
哪個是如何更改序列的列值?
1)重命名從episode_id_seq該序列的最佳方式sequence_id_seq
2)重命名SEQUENCE_NAME的值從episode_id_seq到sequence_id_seq
3)重命名從episode.id所擁有的價值到sequence.id
test777=# \d episode_id_seq
Sequence "public.episode_id_seq"
Column | Type | Value
---------------+---------+---------------------
sequence_name | name | episode_id_seq
last_value | bigint | 1
start_value | bigint | 1
increment_by | bigint | 1
max_value | bigint | 9223372036854775807
min_value | bigint | 1
cache_value | bigint | 1
log_cnt | bigint | 32
is_cycled | boolean | f
is_called | boolean | t
Owned by: public.episode.id
1)和3)工作。如何將列sequence_name的值更改爲scene_id_seq?我得到這個錯誤 test777 =#alter sequence scene_id_seq set sequence_name scene_id_seq; 錯誤:在「sequence_name」處或附近的語法錯誤LINE 1:alter sequence scene_id_seq set sequence_name scene_id_seq; –