update t_book b1
set b1.fyearpublished=2005
where
(
select count(*) from t_book b2
where b1.fcategoryid=b2.fcategoryid
)>3
这个语句用来将所有同类书本数超过三本的图书的出版日期更新为2005
执行语句总有错误提示 如下:
Msg 102, Level 15, State 1, Line 1
'b1' 附近有语法错误。
Msg 102, Level 15, State 1, Line 7
'>' 附近有语法错误。