不知道这样可不可以:
insert into test_form1 select * from test_form1 where tid=2

解决方案 »

  1.   

    insert into test_form1(tid,name)
    select tid,name from test_form1 where tid=2;
      

  2.   

    Rucypli:   谢谢您,不过我不太懂您这两句:insert into test_form1(tid,name)   '这不是插入一个空的新行?
    select tid,name from test_form1 where tid=2;    ‘这不是只是一个查询?这两句,我感觉好像不对呀。是不是要连在一起执行的?
      

  3.   

    "insert into test_form1(tid,name) select tid,name from test_form1 where tid=2; "含义就是将 “select tid,name from test_form1 where tid=2”查询结果作为一批数据插入到 “test_form1(tid,name) ”中 ;建议查询有关MySQL中快速复制数据表方法或SQL脚本相关知识。
      

  4.   

    谢谢各位了!test_form1的字段是有好多的,能不能用 select *的说明,是全部复制呢?
      

  5.   

    test_form1的字段是有好多的,能不能用 select *的说明,是全部复制呢?、select 后边的字段个数必须与 into 表名后边的括号中的 字段数目一致,如果select 后边的字段没有合适值,可以直接设置固定值 。