I know this question could go through several times here, but I really did not find a workaround. Also my question may be a little different.
Situation: I have a table with 130 columns (+100,000 rows), and the number of columns will even increase in the future. For this reason, I would like to define the selection of columns as [select all but one]
AS I want to duplicate a row using [select all] I get a primary key error message → nc_ID, because of course it is trying to duplicate this value, not increase it by one.
Obviously, the column that I want to exclude from the selection is the first, nc_ID. I read and heard that such decisions [select all but one] can only be done using dynamic sql. If anyone could explain to me through a piece, if sql code?
INSERT into TableName (all columns except the first *nc_ID*)
Select * From TableName Where nc_ID=12345;
Thanks in advance!
source
share