Sample Header Ad - 728x90

Why use both TRUNCATE and DROP?

107 votes
7 answers
45884 views
In the system I work on there are a lot of stored procedures and SQL scripts that make use of temporary tables. After using these tables it's good practice to drop them. Many of my colleagues (almost all of whom are much more experienced than I am) typically do this: TRUNCATE TABLE #mytemp DROP TABLE #mytemp I typically use a single DROP TABLE in my scripts. Is there any good reason for doing a TRUNCATE immediately before a DROP?
Asked by user606723 (1526 rep)
Jul 27, 2011, 05:36 PM
Last activity: Oct 18, 2021, 09:26 AM