从A数据里里面读出一张表。里面有4个字段(T_ID,t_type_id,t_kind_id,FIX_PERSON),现在想把这写字段的内容插入到我本地数据库B表里面的这4个字段里面(train_no_type  Rall_way_code Dy_COunt Train_type)

解决方案 »

  1.   

    既然能读出数据插入就好办了
    insert into tablenameb(train_no_type Rall_way_code Dy_COunt Train_type)
    values
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from tablenamea 
      

  2.   

    insert into tablenameb(train_no_type,Rall_way_code,Dy_COunt,Train_type)
    values
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from tablenamea 
    Sql语句报错,所没有表达式。
      

  3.   

    insert into tablenameb(train_no_type,Rall_way_code,Dy_COunt,Train_type)
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from tablenamea 
      

  4.   

    insert into B(train_no_type Rall_way_code Dy_COunt Train_type)
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from A
      

  5.   

    insert into tablenameb(train_no_type Rall_way_code Dy_COunt Train_type)
    values
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from tablenamea 
      

  6.   

    各位大侠。
    insert into B_TRAIN_NO_DEFINE (train_no_type,Rall_way_code,Dy_COunt,Train_type)  select T_ID,t_type_id,t_kind_id,FIX_PERSON from Mytable
    这个SQL语句没有问题了。但是我的Mytable在内存里面,不在数据库里面,现在就是要把这张内存表里面的数据写入到数据库里面。请问怎么做?
      

  7.   

    各位大侠。
    insert into B_TRAIN_NO_DEFINE (train_no_type,Rall_way_code,Dy_COunt,Train_type) select T_ID,t_type_id,t_kind_id,FIX_PERSON from Mytable
    这个SQL语句没有问题了。但是我的Mytable在内存里面,不在数据库里面,现在就是要把这张内存表里面的数据写入到数据库里面。请问怎么做?
     
     什么意思?在内存里,应该是在表空间里吧,利用同名可以做到把表空间里的数据映射到数据库里,这样可以节省空间,而且能够正常使用
      

  8.   


    insert into B(train_no_type,Rall_way_code,Dy_COunt,Train_type)
    values
    select T_ID,t_type_id,t_kind_id,FIX_PERSON
    from A;