select menu_topic,temper_id from menuInfo,temper where temper_id=menu_id 
update menuInfo set menu_topic where menu_topic in(select menu_topic,temper_id from menuInfo,temper where temper_id=menu_id )哪错了

解决方案 »

  1.   

    update menuInfo set menu_topic where menu_topic in(select menu_topic from menuInfo,temper where temper_id=menu_id )
      

  2.   

    menu_id 是变量?还是SqlCommand中的参数?
    如果是变量要改为:
    "select menu_topic,temper_id from menuInfo,temper where temper_id = '" + menu_id + "'"
    如果是SqlCommand中的参数,要改为:
    select menu_topic,temper_id from menuInfo,temper where temper_id = @menu_id
      

  3.   

    好明显。update menuInfo set menu_topic<--这里=什么?都没有写-_-#!还有这里
    where menu_topic in(select menu_topic,temper_id from menuInfo,temper where temper_id=menu_id )你确定只返回一个menu_topic?
      

  4.   

    select menu_topic,temper_id from menuInfo,temper where temper_id=menu_id 
    update menuInfo set menu_topic=temper_topic  //temper_topic  为temper中一列
      

  5.   

    我这是先在查询分析器上写的,结果有错错误:
    列名 'temper_topic' 无效。
      

  6.   

    update menuInfo set menu_topic where menu_topic in(select menu_topic,temper_id from menuInfo,temper where temper_id=menu_id )
    没有更新到,这里set menu_topic 干嘛呢?都没有动作