SyntaxFix
Write A Post
Hire A Developer
Questions
You could stil use @TEMP if you quote the identifier "@TEMP":
@TEMP
"@TEMP"
declare @TEMP table (ID int, Name varchar(max)); insert into @temp SELECT 1 AS ID, 'a' Name; SELECT * FROM @TEMP WHERE "@TEMP".ID = 1 ;
db<>fiddle demo