Skip to main content
deleted 55 characters in body
Source Link
Geoff Griswald
  • 1.1k
  • 2
  • 15
  • 29

Often I find myself wanting to insert all columns except the IDENTITY column into a table, or select all columns apart from one.

I wonder if there's something in SQL Server like:

SELECT * EXCEPT SomeColumn FROM SomeTable

or

INSERT * EXCEPT ThisColumn INTO ThisTable

?

Often I find myself wanting to insert all columns except the IDENTITY column into a table, or select all columns apart from one.

I wonder if there's something in SQL Server like:

SELECT * EXCEPT SomeColumn FROM SomeTable

or

INSERT * EXCEPT ThisColumn INTO ThisTable

?

Often I find myself wanting to insert all columns except the IDENTITY column into a table, or select all columns apart from one.

I wonder if there's something in SQL Server like:

SELECT * EXCEPT SomeColumn FROM SomeTable

?

2
Link
user330315
user330315
Post Closed as "Duplicate" by user330315
Source Link
Geoff Griswald
  • 1.1k
  • 2
  • 15
  • 29

is there a "Wildcard Except" function in MSSQL?

Often I find myself wanting to insert all columns except the IDENTITY column into a table, or select all columns apart from one.

I wonder if there's something in SQL Server like:

SELECT * EXCEPT SomeColumn FROM SomeTable

or

INSERT * EXCEPT ThisColumn INTO ThisTable

?