Oracle's basic operations - using a sequence of

Sequence: the default starting from 1, an increment is mainly used to assign a primary key to use

Create Sequence s_person;
 SELECT s_person.nextval from Dual;
 - Dual is a virtual table, only to complement grammar, no sense 

- to insert a record 
INSERT  INTO Person (PID, pname) values (s_person.nextval, ' Xiaoming ' );
 the commit ;

 

Guess you like

Origin www.cnblogs.com/Sm1lence/p/11426084.html