{"id":1355,"date":"2017-03-13T02:11:34","date_gmt":"2017-03-13T02:11:34","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1355"},"modified":"2017-03-13T02:11:34","modified_gmt":"2017-03-13T02:11:34","slug":"truncate-table-in-teradata","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=1355","title":{"rendered":"Truncate Table in Teradata"},"content":{"rendered":"<p>Coming from SQL Server &amp; Oracle, I wanted a quick way in Teradata to truncate all the records from a table.\u00a0 The issue is the word TRUNCATE is not a reserved word in Teradata.\u00a0 Below is one of a couple ways to remove all the records in a table:<\/p>\n<pre>delete from databasename.tablename;<\/pre>\n<p>In my example below, I wanted to remove all the records in the Sales2018 table in the Retail database:<br \/>\n<a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/02\/TruncateInTeradata.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1356\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/02\/TruncateInTeradata.jpg\" alt=\"TruncateInTeradata\" width=\"567\" height=\"271\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Coming from SQL Server &amp; Oracle, I wanted a quick way in Teradata to truncate all the records from a table.\u00a0 The issue is the word TRUNCATE is not a &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=1355\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1356,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[96,95],"class_list":["post-1355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teradata","tag-delete","tag-truncate-table"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1355"}],"collection":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1355"}],"version-history":[{"count":3,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions"}],"predecessor-version":[{"id":1359,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions\/1359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1356"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}