IDENT_CURRENT is not a function used to retrieve a primary key, it is a
function used to retrieve the current identity value. IDENTITY is not
necessarily PK, nor vice-versa! They are not the same thing...
With a two-column primary key, how do you define "last"? Maybe you could
show your table structure (including key definition), sample data (insert
statements), and desired resultset.
"Simon" <si> wrote in message