retreiving last inserted id
I want to retreive last inserted id from firebird database. Data is succ. inserted, trigger inserts id as it should using generator.
I'm advised to use this syntax
var sql = "INSERT INTO ... VALUES ... " +
"RETURNING Id";
where RETURNING
Id should return table Id.
I dont know how to store into variable.
int lastId = ...