How to create id with AUTO_INCREMENT on Oracle?

后端 未结 16 1878
死守一世寂寞
死守一世寂寞 2020-11-21 04:52

It appears that there is no concept of AUTO_INCREMENT in Oracle, up until and including version 11g.

How can I create a column that behaves like auto increment in Or

16条回答
  •  花落未央
    2020-11-21 05:48

    Assuming you mean a column like the SQL Server identity column?

    In Oracle, you use a SEQUENCE to achieve the same functionality. I'll see if I can find a good link and post it here.

    Update: looks like you found it yourself. Here is the link anyway: http://www.techonthenet.com/oracle/sequences.php

提交回复
热议问题