I want to be able to copy one row in a table to the same table. The table has 10 normal columns and an identity column. Idealy I would like to so something like this,
so that if new columns are added to the table they will be copied across without having to recode.
But because it has an idenity column this isn't possible. Is there any way of doing this without listing out every column in the select and insert?
cheers
Tim
Code:
insert into #table
select * from #table WHERE id = 1
so that if new columns are added to the table they will be copied across without having to recode.
But because it has an idenity column this isn't possible. Is there any way of doing this without listing out every column in the select and insert?
cheers
Tim