SQL DB GENERATED SEQUENCE

DB2 SQL DB GENERATED SEQUENCE : ROWID


  1. Using ROWID is another way to have the system assign a unique value to a column.
  2. ROWID is similar to IDENTITY COLUMNS.
    • But rather than being an attribute of a numeric column, it is a separate data type.
  3. Same as IDENTITY COLUMNS there are 2 options for GENERATED clause.
    1. ALWAYS
    2. BY DEFAULT

CREATE TABLE ORDERS (ORDERNO ROWID GENERATED ALWAYS, SHIPPED_TO 
VARCHAR (36) ,ORDER_DATE DATE)

IBM i developer.

View Comments
There are currently no comments.