having trouble with my stored procedure
Error message: Must declare the table variable "@NameOfTable ".
CREATE
PROCEDURE [dbo].[UniqueRowOnly]
(@NameOfTable varchar(20))
AS
BEGIN
SELECT Paid,
Name,
Picture,
ID
FROM (SELECT Paid,
Name,
Picture,
ID,
Row_number() OVER(PARTITION BY Name ORDER BY ID) rn
FROM @NameOfTable) t
WHERE rn = 1
END