Insert Data Into Temp Table with Query

后端 未结 8 1966
春和景丽
春和景丽 2020-12-12 12:43

I have an existing query that outputs current data, and I would like to insert it into a Temp table, but am having some issues doing so. Would anybody have some insight on h

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 13:16

    You can do that like this:

    INSERT INTO myTable (colum1, column2)
    SELECT column1, column2 FROM OtherTable;
    

    Just make sure the columns are matching, both in number as in datatype.

提交回复
热议问题