Adaptive Server-generated values for IDENTITY columns

When you insert a row into a table with an IDENTITY column, Adaptive Server automatically generates the column value. Do not include the name of the IDENTITY column in the column list or its value in the values list.

This insert statement adds a new row to the sales_daily table. Notice that the column list does not include the IDENTITY column, row_id:

insert sales_daily (stor_id)
values ("7896")

The following statement shows the row that was added to sales_daily. Adaptive Server automatically generated the next sequential value, 2, for row_id:

select * from sales_daily
where stor_id = "7896"
sale_id      stor_id
-------      -------
      1      7896 
 
(1 row affected)