Any idea...
Declare @Columns Table(id Int Identity(1,1), [Name] VarChar(155));
Insert Into @Columns([Name])
Select 'A'
Union All
Select 'B'
Select * From @Columns
Truncate Table @Columns
Insert Into @Columns([Name])
Select 'X'
Union All
Select 'Y'
Select * From @Columns
Rahul
Truncate table and dbcc checkident are not supported on table varible. Use
temp table instead.
Regards, Balaji
"Rahul" <verma....@gmail.com> wrote in message
news:2e795776-04b1-40e0...@u25g2000prh.googlegroups.com...
Rather than using Truncate use DELETE FROM.
Thanks Phil
"Rahul" wrote:
> .
>
But note that Rahul's requirement is to also reseed the identity and DELETE
won't do this. I think he will need to instead use a standard temp table so
that TRUNCATE can be used.
--
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/