insert combine (value and select)

前端 未结 1 1888
长情又很酷
长情又很酷 2020-12-17 15:38

There are ways of inserting data into table:

insert into MyTable (ColA, ColB, ColC) values (\'A\', \'B\', \'C\')

insert into MyTable (ColA, ColB, ColC) sele         


        
相关标签:
1条回答
  • 2020-12-17 16:19

    Just add a constant into the SELECT list

    INSERT INTO MyTable
                (ColA,
                 ColB,
                 ColC)
    SELECT 1,
           colBB,
           colCC
    FROM   MyTable2  
    
    0 讨论(0)
提交回复
热议问题