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 2005 Forums
 Transact-SQL (2005)
 Truncate Table

Author  Topic 

raguyazhin
Posting Yak Master

105 Posts

Posted - 2012-01-17 : 07:46:26
Hi

Why we cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint?

--
Ragu

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-17 : 07:59:52
What do you think? What could be a reason for that?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

raguyazhin
Posting Yak Master

105 Posts

Posted - 2012-01-17 : 23:49:29
quote:
Originally posted by webfred

What do you think? What could be a reason for that?


No, you're never too old to Yak'n'Roll if you're too young to die.



Yes.

I need a internal Operation when truncate Table With referred FK.

--
Ragu
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2012-01-18 : 03:48:31
quote:
Originally posted by raguyazhin


I need a internal Operation when truncate Table With referred FK.



DELETE MyTable

Note that this operation will use more log space than TRUNCATE TABLE.
Go to Top of Page
   

- Advertisement -