identity

  • Can I use scope_identity() in a stored procedure on a column when there is no identity on that column.

  • scope_identity() will return the value of the identity column when you insert a new row into a table, it is therefore acting at a table level and not a column level.

    If you are referring to adding a row to a table which has not got an identity field, then scope_identity() is not going to return anything usable to you.

    Hope this answers your question.

  • Thanks,It helps me lot.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply