我在存儲過程中創建一個臨時表:如何在臨時表中創建自動遞增Id?
CREATE TABLE #tbl (
[Id] INT,
[Correct] BIT
)
我怎麼能填充此表的自動生成越來越多的Id和這樣的數據:
SELECT Correct FROM question
INNER JOIN answer
ON (question.questionId = answer.questionId)
WHERE question.questionid = 25
ORDER BY answer.answerId