Referencing IDENTITY columns  Creating “hidden” IDENTITY columns automatically

Chapter 8: Creating Databases and Tables

Referring to IDENTITY columns with syb_identity

Once you have defined an IDENTITY column, you need not remember the actual column name. You can use the syb_identity keyword, qualified by the table name where necessary, in a select, insert, update, or delete statement on the table.

For example, this query selects the row for which sale_id equals 1:

select * from sales_monthly
    where syb_identity = 1




Copyright © 2005. Sybase Inc. All rights reserved. Creating “hidden” IDENTITY columns automatically

View this book as PDF