呵呵,这么乱呀,用 MySQL-Front 将表结构与表数据建立脚本导出来吧

解决方案 »

  1.   

    按照list的数据结构和规则新建表newlist
     然后运行update newlist a,log b set a.iscloseobstrid=b.newobstrid where a.iscloseobstrid=b.obstrid即可(log的obstrid唯一)
      

  2.   

    INSERT ??插入到一个新表中???INSERT INTO tA ... SELECT ....FROM tB,tC WHERE ...

    CREATE TABLE tA ... SELECT ....FROM tB,tC WHERE ...
      

  3.   

    第一次用
    create table newlist 
    select a.iscloseid,a.isclosetime,a.userid,b.newobstrid as iscloseobstrid,a.lingdan 
    from list a,log b 
    where a.iscloseobstrid=b.obstrid以后更新insert into newlist 
    select a.iscloseid,a.isclosetime,a.userid,b.newobstrid as iscloseobstrid,a.lingdan 
    from list a,log b 
    where a.iscloseobstrid=b.obstrid