Insert Table1 (group) Select group from Table1 Where group = 'aaa'

解决方案 »

  1.   

    看不懂你的意思啊。两个TABLE1表在一个数据库里吗?如果在一个库里,那么表的主键是什么啊??
      

  2.   

    上一句有误,应如下
    Insert table1 Select 'system',ElseField Select * from table1 where group = 'aaa'
      

  3.   


    try
    insert into table1 values( select 'system' from table1 where group='aaa')
      

  4.   

    上一句有误,应如下
    Insert table1 Select 'system',ElseField from table1 where group = 'aaa'
      

  5.   

    txlicenhe(菜是菜点,还行),
    我在查询分析器中试了你给的语句,有问题提示:服务器: 消息 213,级别 16,状态 4,行 1
    插入错误: 列名或所提供值的数目与表定义不匹配。
    服务器: 消息 207,级别 16,状态 1,行 1
    列名 'ElseField' 无效。
      

  6.   

    insert table1(group,elsefield) (select 'system,'elsefield from table1)
      

  7.   

    不要完全采用,elsefield是指table1中的其他列名
      

  8.   

    Insert Table1 (group) Select'system' from Table1 Where group = 'aaa'