Data Set Options for Relational Databases |
Default value: | NO |
Valid in: | DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software) |
DBMS support: | DB2 under UNIX and PC Hosts |
Syntax | |
Syntax Description | |
Details | |
See Also |
Syntax |
FETCH_IDENTITY=YES | NO |
returns the value of the last inserted identity value.
disables this option.
Details |
You can use this option instead of issuing a separate SELECT statement after an INSERT statement. If FETCH_IDENTITY=YES and the INSERT that is executed is a single-row INSERT, the engine calls the DB/2 identity_val_local() function and places the results into the SYSDB2_LAST_IDENTITY macro variable. Because the DB2 engine default is multirow inserts, you must set INSERTBUFF=1 to force a single-row INSERT.
See Also |
FETCH_IDENTITY= LIBNAME Option
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.