Home > Archive > MS SQL Server MSEQ > May 2005 > Clearing tables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Clearing tables
Chris Lieb

2005-05-18, 1:23 pm

Which is the more efficient way to clear the contents of a table:
DELETE FROM tableName
TRUNCATE TABLE tableName
Or DROP the table then create it again?

--
Chris Lieb
UPS CACH, Hodgekins, IL
Tech Support Group - Systems/Apps
Hari Prasad

2005-05-18, 8:26 pm

Hi,

I will go with TRUNCATE TABLE <Table Name>

Thanks
Hari
SQL Server MVP

"Chris Lieb" < ChrisLieb@discussion
s.microsoft.com> wrote in message
news:E6085077-8B80-4573-B40D- E9837967B463@microso
ft.com...
> Which is the more efficient way to clear the contents of a table:
> DELETE FROM tableName
> TRUNCATE TABLE tableName
> Or DROP the table then create it again?
>
> --
> Chris Lieb
> UPS CACH, Hodgekins, IL
> Tech Support Group - Systems/Apps



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com