Create and auto-increment field using “sequence” in Oracle database
Create a database table: create table Books ( bookID number(38), title varchar2(50), author varchar2(50), pages number(38), constraint pk_bookID PRIMARY KEY(bookID) ); Create a sequence: Create sequence sequence_name start with value increment by value minvalue value maxvalue value; ***** For example **** Create sequence auto_incr start with 1 increment by 1; Insert some sample data into … Read more