>The lowest version is SQL Server 2008 (Express edition). And the FIFO is the correct answer. > >Question: I am doing all my testing on a temp table. That is, I create a temp table and copy the records from the actual table to the temp table (so, that I don't mess up the real data). And in the SSMS all variables for the temp table are shown with the red squiggly line (under). But the code works. Is this normal that the temp table has these squiggly red lines? > https://blog.sqlauthority.com/2013/07/04/sql-server-how-to-refresh-ssms-intellisense-cache-to-update-schema-changes/
Too bad that your lowest version is SQL Server 2008 because otherwise it would be a simpler solution.