是不是漏掉了什么?!update tbclinfo 
set fddtime = getdate()
 from tbclinfo,--这种格式应该加上要更新的表
(select top 3 * from tbclinfo where fdcneirong like  '%'+ @messagetemp+'%'  order by fddtime ) AS t1 
WHERE tbclinfo.fdiid = t1.fdiid
--其实就是更新符合fdcneirong like  '%'+ @messagetemp+'%' 条件的纪录,按照fddtime降序排列的前三条的fddtime为GETDATE(),即当前时间

解决方案 »

  1.   

    update tbclinfo set fddtime = getdate() from (select top 3 * from tbclinfo where fdcneirong like  '%'+ @messagetemp+'%'  order by fddtime ) AS t1 WHERE tbclinfo.fdiid = t1.fdiid首先:是子查询 select top 3 * from tbclinfo where fdcneirong like  '%'+ @messagetemp+'%'  order by fddtime  表示从表tbclinfo里面找到  列fdcneirong内容包含 @messagetemp 的前三条记录然后:修改表tbclinfo中的fddtime等于当天的日期。修改条件是表tbclinfo.fdiid和子查询的结果集T1.tbclinfo相等。