SELECT *
FROM [Live].[Test]
WHERE [_fk_RoadMapKey] = @_fk_RoadMapKey
SELECT @TestKey = [TestKey]
FROM [Live].[Test]
WHERE [_fk_RoadMapKey] = @_fk_RoadMapKey
SELECT *
FROM [Live].[SetofTestGrades]
WHERE [_fk_TestKey] = @TestKey
前两个语句,我们可以在分配 testkey 的同时获取所有测试吗
SELECT * ,@TestKey = [TestKey] FROM [Live].[Test]
WHERE [_fk_RoadMapKey] = @_fk_RoadMapKey