Insert all values of a table into another table in SQL

后端 未结 9 1010
礼貌的吻别
礼貌的吻别 2020-11-29 16:56

I am trying to insert all values of one table into another. But the insert statement accepts values, but i would like it to accept a select * from the initial_Table. Is this

9条回答
  •  悲&欢浪女
    2020-11-29 17:49

    You can insert using a Sub-query as follows:

    INSERT INTO new_table (columns....)
    SELECT columns....
    FROM initial_table where column=value
    

提交回复
热议问题