I am trying to create a stored procedure to achieve the following in the stored procedure:
CREATE proc [dbo].[spByTableNameReturnLastRowNew] @tableName nvarchar(5