Example 1: The statement below creates a sequence named "tab_seq" that starts at 1, increments by 1 (INCREMENT 1 is the default), does not cycle (NO CYCLE is the default), and caches 50 values at a time (the default is 20).

CREATE SEQUENCE ORDER_SEQ
 START WITH 1
 CACHE 50;

Example 2: In the following example, we create a sequence called PROD_SEQ and use it in a table named PRODUCTS:

CREATE SEQUENCE PROD_SEQ
 START WITH 1;

INSERT INTO PRODUCTS (PRODNO, PRODDESC)
 VALUES (NEXT VALUE FOR PROD_SEQ, 100);

or to update the products:

UPDATE PRODUCTS
 SET PRODNO = NEXT VALUE FOR PROD_SEQ
 WHERE PRODNO = 100;