当我执行下面的 SQL 时,我收到错误“必须声明表变量“@ID”。” 但我要宣布它有什么问题吗?
DECLARE @ID uniqueidentifier
SET @ID = NEWID()
SELECT pcx_vacancyassociationId
INTO pcx_vacancyassociationBase
FROM @ID
SELECT pcx_candidate_to_pcx_vacancyId, .pcx_candidateid, pcx_vacancyid
INTO pcx_vacancyassociationExtensionBase
FROM @ID, pcx_candidate_to_pcx_vacancyBase.pcx_candidateid, pcx_candidate_to_pcx_vacancyBase.pcx_vacancyid