The primary key currval select is udpated to use proper calls so it works with serial and identity columns