• Hi.. i think for that You need to use

    SCOPE_IDENTITY()

    @@IDENTITY in sql server 2005.