Question for all and anyone who would like to help.
I have a database table with a primary key field called 'ID' which is auto-incremented (i.e. has identity set to yes and an identity seed of 1, increment 1). Other fields in the database are 'Title' and 'Location'.
When I do an INSERT (to insert a new Title and Location), I would like to be able to get the value of the ID field for this new INSERT. So my question is, does an INSERT statement return anything? and if it does, would that be the 'ID' field in this case?
Any help would be appreciated. I had seen a similar post on here a while back, but after doing some searches through the post i was unsuccessful at finding it.
I have a database table with a primary key field called 'ID' which is auto-incremented (i.e. has identity set to yes and an identity seed of 1, increment 1). Other fields in the database are 'Title' and 'Location'.
When I do an INSERT (to insert a new Title and Location), I would like to be able to get the value of the ID field for this new INSERT. So my question is, does an INSERT statement return anything? and if it does, would that be the 'ID' field in this case?
Any help would be appreciated. I had seen a similar post on here a while back, but after doing some searches through the post i was unsuccessful at finding it.