开发者

update multiple rows with single update SQL Server

开发者 https://www.devze.com 2023-02-02 19:38 出处:网络
Why does this SQL query not work : update MyTable set IsOk = 1 where MyName = \'OK\' error is : Subquery retu开发者_开发百科rned more than 1 value.

Why does this SQL query not work :

update MyTable
set IsOk = 1
where MyName = 'OK'

error is :

Subquery retu开发者_开发百科rned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

thanks for help


Can you check 'OK' value might be containing dirty value? If not, 1 value might be also.

0

精彩评论

暂无评论...
验证码 换一张
取 消