As we all know, in MySQL, it is very easy to automatically increment the primary key. You only need to add auto_increment to the primary key definition, but not in Oracle, and it takes a few steps to complete 1. Create a table Create tables account ( number integer not null, CHAR (+) not null, name of the householder CHAR (+) not null, address CHAR ($) Not null, undertaker CHAR (+) not null, dates date not null, constraint pk_ hukou primary key (household number)); 2. Create a sequence sequence: CREATE SEQUENCE book_sequence increment by 1 --add several START with 1 each time --counting starting from 1 nomaxvalue --not setting the maximum value nocycle; --keep accumulating, not looping 3. Create a trigger: CREATE TRIGGER book_increase BeforeInsert on account this for each rowbeginselect book_sequence.nextval into:new. Account number from dual;end;& nbsp; In this case, when inserting the account in this table, the primary key input NULL, you can achieve auto-increment. There is a place to emphasize that some beginners like to name in Chinese such a very troublesome. And it is not in line with the idea of internationalization, but sequence must be in English.