Home Forums SQL Server 2005 Administering How To Get Last Inserted Record Value In SQL Server RE: How To Get Last Inserted Record Value In SQL Server

  • JasonClark (7/22/2016)


    we can use SELECT @@IDENTITY, SELECT SCOPE_IDENTITY(), SELECT IDENT_CURRENT(‘TableName’) to get last inserted record: https://mostafaelmasry.com/2016/05/09/how-to-find-the-last-inserted-record-in-sql-server/[/url]

    Since all of these methods depend on the table having an identity column, and the OP stated that no such column exists, none of these will work.

    Also, you want to be careful about resurrecting old threads, unless you have something that will add to the discussion. The OP for this thread has not logged on since 2010, so is extremely unlikely to return to answer any questions.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA