I have the below stored procedure that we've identified as being vulnerable to SQL injection, but I'm not sure how to achieve the same kind of thing without injection. Any ideas appreciated
CREATE PROCEDURE [dbo].[usp_Trun_Tab]
(@TrunTableSchema VARCHAR(100),
@TrunTableName VARCHAR(254))
WITH EXECUTE AS OWNER
AS
BEGIN
DECLARE @SQL NVARCHAR(400)
SET @SQL = 'TRUNCATE TABLE '+ @TrunTableSchema +'.'+@TrunTableName
EXEC sp_EXECUTESQL @SQL
END