update 表a = 3,b = (select distinct b from 表2 where 条件)

解决方案 »

  1.   

    不清楚。
    能不能这样insert啊?
      

  2.   

    insert into 表(a,b) select distinct 3, b from 表2 where 条件)
      

  3.   

    啊???
    不用写values吗?
    把字段和前面表的字段对应起来就行了吗?
      

  4.   

    insert into 表 
    (a,b)
    values
    (3,select distinct b from 表2 where 条件)楼主写没有问题在插入时要插入其他表已经存在的某一记录的某个字段要怎么做啊?
    不太明白什么意思
      

  5.   

    应该不行
      select distinct b from 表2 where 条件
    得到的有可能不止一条记录。