Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How truncate this table

Author  Topic 

iswan
Starting Member

28 Posts

Posted - 2007-06-18 : 07:27:53
I am creating a table using the below code

'declare @ReadChap table(RowID int identity(1,1),L2id varchar(100))'

How truncate '@ReadChap' this table

Regards
Iswan

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-18 : 07:40:45
[code]Delete Table @ReadChap[/code]

Truncate Table command won't work with table variables.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Jeff Moden
Aged Yak Warrior

652 Posts

Posted - 2007-06-18 : 08:38:45
Since temp tables and table variables both start out in memory and move to disk if they get too big, why don't you use a temp table, instead?

--Jeff Moden
Go to Top of Page
   

- Advertisement -