<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Truncate and Delete Difference - MSSQL Query</title>
	<atom:link href="https://mssqlquery.com/tag/truncate-and-delete-difference/feed" rel="self" type="application/rss+xml" />
	<link>https://mssqlquery.com</link>
	<description>MSSQL and TSQL Programming and TSQL Examples</description>
	<lastBuildDate>Sat, 18 Mar 2023 18:14:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.2</generator>

<image>
	<url>https://mssqlquery.com/wp-content/uploads/2023/06/cropped-mssql-query-icon-32x32.png</url>
	<title>Truncate and Delete Difference - MSSQL Query</title>
	<link>https://mssqlquery.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Differences Between Truncate and Delete in SQL Server</title>
		<link>https://mssqlquery.com/differences-between-truncate-and-delete-in-sql-server</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Sat, 18 Mar 2023 18:14:38 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Truncate and Delete]]></category>
		<category><![CDATA[Truncate and Delete Difference]]></category>
		<category><![CDATA[Truncate and Delete SQL Server]]></category>
		<guid isPermaLink="false">https://mssqlquery.com/?p=1428</guid>

					<description><![CDATA[<p>Hello everyone, In this article, I will give information about the differences between Truncate and Delete in SQL Server. We&#8217;ve all wondered about the differences between Truncate and Delete, which we all use in SQL Server. Both commands delete the data inside the table, not the structural content of the&#46;&#46;&#46;</p>
<p>The post <a href="https://mssqlquery.com/differences-between-truncate-and-delete-in-sql-server">Differences Between Truncate and Delete in SQL Server</a> first appeared on <a href="https://mssqlquery.com">MSSQL Query</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>In this article, I will give information about the differences between Truncate and Delete in SQL Server.</p>
<p>We&#8217;ve all wondered about the differences between Truncate and Delete, which we all use in SQL Server.</p>
<ol>
<li>Both commands delete the data inside the table, not the structural content of the table.</li>
<li>Truncate consumes less log resources while Delete command consumes a lot of log resources. That&#8217;s why the Truncate command works faster than the Delete command. As for the reason, the Delete command deletes the lines one by one and makes a transaction log entry for each line it deletes.</li>
<li>When using the delete command, we have the possibility to add the where condition to our query. There is no such facility in the truncate command, it deletes all records.</li>
<li>If there is an identity column in our table, when the Delete is done, the column continues to count from where it left off. When Truncate Table is made, it will start counting from the beginning.</li>
<li>If there is a Trigger for the Delete operation on the table, the Trigger will not be triggered when we make a Truncate Table. In the delete command, the Trigger is triggered.</li>
<li>Tables containing Foreign Keys are not made Truncate Table. Delete command should be used.</li>
</ol>
<p>As you can see, we have learned the differences between Truncate and Delete in SQL Server.</p>
<p>Good luck to everyone in business and life.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 76</span><span class='epvc-label'> Views</span></div><p>The post <a href="https://mssqlquery.com/differences-between-truncate-and-delete-in-sql-server">Differences Between Truncate and Delete in SQL Server</a> first appeared on <a href="https://mssqlquery.com">MSSQL Query</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
