How to create an Oracle sequence starting with max value from a table?

后端 未结 8 1295
[愿得一人]
[愿得一人] 2020-12-02 20:14

Trying to create a sequence in Oracle that starts with the max value from a specific table. Why does this not work?

CREATE SEQUENCE transaction_sequence
  MI         


        
8条回答
  •  眼角桃花
    2020-12-02 20:35

    You can't use a subselect inside a CREATE SEQUENCE statement. You'll have to select the value beforehand.

提交回复
热议问题