使用pl/sql的文本导入器时如何设置主键自增长

时间:2024-01-13 14:40:20

在使用文本导入器批量导入数据时,如果需要设置主键自增长,可以先创建一个序列:

create sequence SEQ_Userinf start with 1 increment by 1
nomaxvalue
nominvalue
nocache;

然后在导入时设置主键字段的sql函数为:SEQ_Userinf.nextval就可以了。