我需要使用select查询中的结果更新table1的'DA_ArticleDetails'列。我试过这样的事情:
UPDATE table1
SET [DA_ArticleDetails] =
(
select RIGHT([DA_ArticleDetails], 8000)
from table1
)
但是给出错误:
Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
有人可以帮我更新专栏吗?
答案 0 :(得分:2)
UPDATE table1
SET [DA_ArticleDetails] = RIGHT([DA_ArticleDetails], 8000)
from table1
答案 1 :(得分:2)
您只需拨打以下查询
即可UPDATE table1
SET [DA_ArticleDetails] =RIGHT([DA_ArticleDetails], 8000)