Last primary key

It is possible to know the primary key value of the last insert in a field sequential?

It depends. If the field is an autonumbering and you use MySQL then you can retrieve that by a sql statement:select last insertid();

see http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id

But on oracle you need to do a select on nextval and I guess every DB has it’s own way.

We use postgresql and I solved it using a SQL query on the sequence of the primary key.

The question was directed to whether there was any Scriptcase macro to make this independent inquiry database.

Still, thanks for attention