INSERT INTO TCUSTPLACE select ... from where

解决方案 »

  1.   

    INSERT INTO TCUSTPLACE (col...)select id,姓名 from table1 where id=22
      

  2.   

    具体怎么写啊?INSERT INTO TCUSTPLACE ( id ) VALUES ( select id,姓名 from table1 where id=22 )可select id,姓名 from table1 where id=22返回的不是他的姓名,而是一个真假条件啊
      

  3.   

    select 姓名 from table1 where id=22返回的不是姓名么
      

  4.   

    INSERT INTO TCUSTPLACE ( id )
    select 姓名 from table1 where id=22这样写没问题吧  姓名的类型要与TCUSTPLACE 中 id类型一至
      

  5.   

    insert 后面可以跟条件吗?跟查询条件!INSERT INTO table1( id ) VALUES ('77') where (select 姓名 from table1 where id is not 22)在插入记录的时候,查询有没有id为22的记录.如果有就不插了,如果没有就插,我这样写了,有错.不知道错在哪里