我收到此错误:
"Error 102 : non-boolean type specified in a context where a condition is expected"
对于此请求:
DECLARE @num_dossiers TABLE (num_dossier INT,indice NVARCHAR(3))
insert into @num_dossiers
select num_dossier,indice from dossier where num_sec=57
delete from constitue where (num_dossier,indice) in select (num_dossier,indice) from @num_dossiers
触发错误的请求是最后一个:
delete from constitue where (num_dossier,indice) in select (num_dossier,indice) from @num_dossiers
这个错误的原因可能是什么?
SQL Server 不支持多列 IN 子句(与 Oracle 不同)。
这可以重写为 EXISTS: