Get the last inserted row ID SAP Hana db (database)

By Kelvin
May 04, 2017 1648

If your SAP Hana table has a column of type INT IDENTITY (or BIGINT IDENTITY), then you can get the latest inserted value using:

INSERT INTO dbo.YourTable(columns....)
   VALUES(..........)

select current_identity_value() FROM DUMMY;

This works as long as you haven't inserted another row - it just returns the last IDENTITY value handed out in this scope here.

Leave A Comment


{{i.FullName}}

{{i.Message}}

  • {{i.CreatedOn | jsonDate}}

RELATED VIDEOS

Youtube

Video's Name

Video's Name

By Kelvin
25/3/2015 1,200
Youtube

Video's Name

Video's Name

By Kelvin
25/3/2015 1,200
Youtube

Video's Name

Video's Name

By Kelvin
25/3/2015 1,200