SQL Server error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or
SQL Server error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or
运行 SQL 服务器中的查询时出现以下错误:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or
谁能帮帮我
我的代码如下所示:
UPDATE a
SET a.id = (SELECT f.id
FROM f
JOIN a ON a.fun = [f].funny
WHERE a.fun = [f].funny);
您可以尝试使用加入更新
update t1 set t1.col = t2.col
from table1 t1
join table2 t2 on t2.id = t1.id
where conditions ...
运行 SQL 服务器中的查询时出现以下错误:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or
谁能帮帮我
我的代码如下所示:
UPDATE a
SET a.id = (SELECT f.id
FROM f
JOIN a ON a.fun = [f].funny
WHERE a.fun = [f].funny);
您可以尝试使用加入更新
update t1 set t1.col = t2.col
from table1 t1
join table2 t2 on t2.id = t1.id
where conditions ...