Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Identity after updated

Identity after updated

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadminhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    webhay
    wrote on last edited by
    #1

    Hi, I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table? Please help Thank you Sms

    P P 2 Replies Last reply
    0
    • W webhay

      Hi, I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table? Please help Thank you Sms

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Do you mean that you have an Identity column in your table and, following an update, you want to find out he value in this field for the records that were updated? If so, you should look at the values in this field for the rows in the inserted entity in your trigger implementation.

      Paul Marfleet

      1 Reply Last reply
      0
      • W webhay

        Hi, I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table? Please help Thank you Sms

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        If you need the identity of the inserted record in the main table, use the scope_identity() function to retrieve the data.

        Deja View - the feeling that you've seen this post before.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups