MS SQL Exception: Incorrect syntax near ‘@P0’ March 19, 2023 by Tarik SQL Server requires you to place parenthesis around the argument to top if you pass in a variable: SELECT TOP (?)