T-SQL Insert into table without having to specify every column

后端 未结 7 2520
悲&欢浪女
悲&欢浪女 2021-02-18 13:25

In our db there is a table that has a little over 80 columns. It has a primary key and Identity insert is turned on. I\'m looking for a way to insert into this table every colum

7条回答
  •  时光说笑
    2021-02-18 14:10

    Why not just create a VIEW of the original data, removing the unwanted fields? Then 'Select * into' your hearts desire.

    • Localized control within a single view
    • No need to modify SPROC
    • Add/change/delete fields easy
    • No need to query meta-data
    • No temporary tables

提交回复
热议问题