Chinaunix首页 | 论坛 | 博客
  • 博客访问: 675340
  • 博文数量: 176
  • 博客积分: 4791
  • 博客等级: 上校
  • 技术积分: 1921
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-24 18:47
个人简介

it江湖漂,怎能不挨刀;一朝机器当,看你怎么着!

文章分类

全部博文(176)

文章存档

2014年(2)

2012年(17)

2011年(27)

2010年(18)

2009年(6)

2008年(21)

2007年(43)

2006年(42)

分类: LINUX

2008-05-16 11:06:57

更新该句
update da_question set answer_time = now()
where id in (
 select id from da_question where  answer_time is null and id  in (select distinct parent_id from da_question)
 )
 
在 MySQL 命令列工具中傳回:
ERROR 1093 (HY000): You can't specify target table 'forum_members' for update in FROM clause
 
改成下列命令處理就 可以解决无法更新的问题
update da_question a inner join ( select id from da_question where  answer_time is null and id  in (select distinct parent_id from da_question)) b on a.id=b.id set answer_time=now();
阅读(1764) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~