T-SQL Insert into table without having to specify

2020-07-02 00:01发布

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 column EXCEPT the primary key column from an identical table in a different DB.

Is this possible?

7条回答
Lonely孤独者°
2楼-- · 2020-07-02 00:48

Really, honestly it takes ten seconds or less to pull all of the columns over from the object browser and then delete the identity column from the list. It is a bad idea to use select * for anything but quick ad hoc query.

查看更多
登录 后发表回答