{"id":3871,"date":"2026-09-17T00:30:15","date_gmt":"2026-09-16T19:00:15","guid":{"rendered":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql"},"modified":"2026-09-17T00:30:38","modified_gmt":"2026-09-16T19:00:38","slug":"ddl-commands-in-sql","status":"publish","type":"post","link":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql","title":{"rendered":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained"},"content":{"rendered":"<p>DDL stands for Data Definition Language. These are the SQL commands that build and change the structure of your database: the tables, the columns, the constraints. They do not touch the rows inside those tables, which is what DML does. There are five of them in common use, and most of a data analyst&#8217;s day involves only two.<\/p>\n<p>If you are preparing for an interview, the distinction that gets asked most is DROP versus TRUNCATE versus DELETE. That one is at the end of this article, with the answer that actually gets you the mark.<\/p>\n<h2>The five DDL commands at a glance<\/h2>\n<p>Each row below gives the command, what it does to the database, the general syntax, and a working example. The examples use a single scenario throughout: a Bengaluru electronics retailer tracking orders, so you can follow one table as it changes shape.<\/p>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>What it does<\/th>\n<th>Syntax<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>CREATE<\/td>\n<td>Makes a new table, database, view or index<\/td>\n<td>CREATE TABLE name (column datatype, &#8230;)<\/td>\n<td>CREATE TABLE orders (order_id INT PRIMARY KEY, customer_name VARCHAR(100), amount DECIMAL(10,2))<\/td>\n<\/tr>\n<tr>\n<td>ALTER<\/td>\n<td>Changes the structure of an existing table<\/td>\n<td>ALTER TABLE name ADD column datatype<\/td>\n<td>ALTER TABLE orders ADD city VARCHAR(50)<\/td>\n<\/tr>\n<tr>\n<td>DROP<\/td>\n<td>Deletes the table and its structure entirely<\/td>\n<td>DROP TABLE name<\/td>\n<td>DROP TABLE orders<\/td>\n<\/tr>\n<tr>\n<td>TRUNCATE<\/td>\n<td>Removes every row but keeps the empty table<\/td>\n<td>TRUNCATE TABLE name<\/td>\n<td>TRUNCATE TABLE orders<\/td>\n<\/tr>\n<tr>\n<td>RENAME<\/td>\n<td>Changes a table&#8217;s name<\/td>\n<td>RENAME TABLE old TO new<\/td>\n<td>RENAME TABLE orders TO customer_orders<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Two things to notice. DROP and TRUNCATE both destroy data, and neither asks you to confirm. And ALTER is the one you will actually use most often, because real tables change shape constantly as a business starts tracking new things.<\/p>\n<h2>CREATE: building the table<\/h2>\n<p>CREATE defines what a table holds before any data goes into it. You name each column and give it a data type, and the database enforces that type from then on.<\/p>\n<table>\n<thead>\n<tr>\n<th>Element<\/th>\n<th>What it does<\/th>\n<th>Syntax<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Basic table<\/td>\n<td>Defines columns and types<\/td>\n<td>CREATE TABLE name (col type, col type)<\/td>\n<td>CREATE TABLE orders (order_id INT, amount DECIMAL(10,2))<\/td>\n<\/tr>\n<tr>\n<td>PRIMARY KEY<\/td>\n<td>Marks the column that uniquely identifies a row<\/td>\n<td>col type PRIMARY KEY<\/td>\n<td>order_id INT PRIMARY KEY<\/td>\n<\/tr>\n<tr>\n<td>NOT NULL<\/td>\n<td>Refuses rows where this column is empty<\/td>\n<td>col type NOT NULL<\/td>\n<td>customer_name VARCHAR(100) NOT NULL<\/td>\n<\/tr>\n<tr>\n<td>DEFAULT<\/td>\n<td>Fills a value when none is supplied<\/td>\n<td>col type DEFAULT value<\/td>\n<td>status VARCHAR(20) DEFAULT &#8216;pending&#8217;<\/td>\n<\/tr>\n<tr>\n<td>CREATE DATABASE<\/td>\n<td>Makes a new database<\/td>\n<td>CREATE DATABASE name<\/td>\n<td>CREATE DATABASE retail_analytics<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The data type matters more than beginners expect. VARCHAR(100) reserves space for up to 100 characters; INT holds whole numbers; DECIMAL(10,2) holds a number with ten digits total and two after the decimal point, which is what you want for money. Storing a rupee amount as a floating-point type is a classic mistake, because floats introduce rounding errors that show up as one-paisa discrepancies in a monthly total.<\/p>\n<h2>ALTER: changing a table that already exists<\/h2>\n<p>ALTER is the workhorse. A business decides it wants to track delivery city, or a column was sized too small, or a field that should never have been optional needs a constraint. ALTER does all of that without rebuilding the table.<\/p>\n<table>\n<thead>\n<tr>\n<th>Operation<\/th>\n<th>What it does<\/th>\n<th>Syntax<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ADD column<\/td>\n<td>Appends a new column<\/td>\n<td>ALTER TABLE t ADD col type<\/td>\n<td>ALTER TABLE orders ADD city VARCHAR(50)<\/td>\n<\/tr>\n<tr>\n<td>DROP column<\/td>\n<td>Removes a column and its data<\/td>\n<td>ALTER TABLE t DROP COLUMN col<\/td>\n<td>ALTER TABLE orders DROP COLUMN city<\/td>\n<\/tr>\n<tr>\n<td>MODIFY column<\/td>\n<td>Changes a column&#8217;s data type or size<\/td>\n<td>ALTER TABLE t MODIFY col newtype<\/td>\n<td>ALTER TABLE orders MODIFY customer_name VARCHAR(150)<\/td>\n<\/tr>\n<tr>\n<td>RENAME column<\/td>\n<td>Renames a column in place<\/td>\n<td>ALTER TABLE t RENAME COLUMN old TO new<\/td>\n<td>ALTER TABLE orders RENAME COLUMN amount TO order_value<\/td>\n<\/tr>\n<tr>\n<td>ADD constraint<\/td>\n<td>Adds a rule the data must satisfy<\/td>\n<td>ALTER TABLE t ADD CONSTRAINT name type (col)<\/td>\n<td>ALTER TABLE orders ADD CONSTRAINT pk_order PRIMARY KEY (order_id)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>One syntax warning that costs people marks in interviews and time at work: MODIFY is MySQL and Oracle. SQL Server uses ALTER COLUMN, and PostgreSQL uses ALTER COLUMN with a TYPE keyword. The concept is identical across all of them; only the keyword changes. Say which database you mean when you answer, and you will sound like someone who has used more than one.<\/p>\n<p>Shrinking a column is where ALTER bites. Going from VARCHAR(150) down to VARCHAR(50) on a table that already holds a 90-character name will either error out or silently truncate, depending on the database and its settings. Check your longest existing value before you shrink anything.<\/p>\n<h2>DROP, TRUNCATE and DELETE: the three ways to remove things<\/h2>\n<p>This is the most-asked DDL question in analyst interviews, and the reason is that the three commands look similar and behave very differently.<\/p>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Type<\/th>\n<th>What it removes<\/th>\n<th>Can you roll it back<\/th>\n<th>Speed on a large table<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DELETE<\/td>\n<td>DML<\/td>\n<td>Chosen rows, or all rows with no WHERE<\/td>\n<td>Yes, inside a transaction<\/td>\n<td>Slow; logs every row<\/td>\n<\/tr>\n<tr>\n<td>TRUNCATE<\/td>\n<td>DDL<\/td>\n<td>Every row, structure stays<\/td>\n<td>Usually no<\/td>\n<td>Fast; deallocates pages<\/td>\n<\/tr>\n<tr>\n<td>DROP<\/td>\n<td>DDL<\/td>\n<td>Rows, structure, constraints, indexes<\/td>\n<td>No<\/td>\n<td>Fast<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The way to hold it in your head: DELETE removes data, TRUNCATE empties the table, DROP removes the table. After DELETE and TRUNCATE you can still run a SELECT against the table and get zero rows back. After DROP, that SELECT errors, because there is no table.<\/p>\n<p>Two follow-ups interviewers like. First, TRUNCATE usually resets an auto-increment counter back to its starting value while DELETE does not, so a table truncated and refilled starts its IDs at 1 again. Second, DELETE can carry a WHERE clause and the other two cannot, which is the practical reason you reach for DELETE when you only want some of the rows gone.<\/p>\n<h2>DDL versus DML, in one table<\/h2>\n<p>Interviewers often open with this because it sorts out who has actually written SQL from who has read about it.<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>DDL<\/th>\n<th>DML<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Full name<\/td>\n<td>Data Definition Language<\/td>\n<td>Data Manipulation Language<\/td>\n<\/tr>\n<tr>\n<td>Works on<\/td>\n<td>Structure: tables, columns, constraints<\/td>\n<td>Data: the rows inside tables<\/td>\n<\/tr>\n<tr>\n<td>Commands<\/td>\n<td>CREATE, ALTER, DROP, TRUNCATE, RENAME<\/td>\n<td>SELECT, INSERT, UPDATE, DELETE<\/td>\n<\/tr>\n<tr>\n<td>Auto-commit<\/td>\n<td>Yes, in most databases<\/td>\n<td>No, needs an explicit COMMIT<\/td>\n<\/tr>\n<tr>\n<td>Rollback<\/td>\n<td>Generally not possible<\/td>\n<td>Possible before COMMIT<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>That auto-commit row is the one worth remembering, because it explains why DDL is dangerous. When you run an UPDATE without a WHERE clause you can often roll it back. When you run a DROP TABLE, most databases have already committed it by the time you see the error in your own face.<\/p>\n<h2>Mistakes that cost people real data<\/h2>\n<p><strong>Running DROP when you meant TRUNCATE.<\/strong> You wanted an empty table to reload; you now have no table, and every view, index and foreign key that pointed at it is gone too.<\/p>\n<p><strong>Assuming TRUNCATE can be rolled back.<\/strong> In some databases inside some transaction settings it can. Do not rely on it. Treat TRUNCATE as permanent and take a backup first.<\/p>\n<p><strong>Adding a NOT NULL column to a populated table.<\/strong> The existing rows have no value for it, so the database refuses. Add the column as nullable, populate it, then apply the constraint with a second ALTER.<\/p>\n<p><strong>Testing on production because &#8220;it is only a structural change&#8221;.<\/strong> Structural changes are exactly the ones you cannot undo. Every DDL statement should run against a copy first.<\/p>\n<h2>Where DDL sits in an analyst&#8217;s actual job<\/h2>\n<p>Being honest about this: if your job title is data analyst, you will spend most of your time in SELECT, not in DDL. You are usually querying tables somebody else designed. DDL matters for you in three situations, and they are worth knowing well rather than exhaustively.<\/p>\n<p>You will CREATE tables when you build a staging area for your own analysis. You will ALTER them constantly as your analysis evolves. And you will be asked about DROP versus TRUNCATE versus DELETE in almost every interview, because it is a quick test of whether you understand that structure and data are different things.<\/p>\n<p>If you are aiming at data engineering rather than analysis, the weighting flips and DDL becomes central. That is worth knowing before you choose which way to specialise.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>What does DDL stand for in SQL?<\/h3>\n<p>DDL stands for Data Definition Language. It is the subset of SQL used to define and change the structure of a database, including its tables, columns, indexes and constraints. The main DDL commands are CREATE, ALTER, DROP, TRUNCATE and RENAME.<\/p>\n<h3>Is TRUNCATE a DDL or DML command?<\/h3>\n<p>TRUNCATE is classified as DDL, even though it removes data rather than structure. The reason is that it works by deallocating the data pages the table uses rather than deleting rows one at a time, and it auto-commits like other DDL commands. This is why it is fast and why it generally cannot be rolled back.<\/p>\n<h3>What is the difference between DROP and TRUNCATE?<\/h3>\n<p>TRUNCATE removes every row but leaves the empty table in place, so you can still query it and insert into it afterwards. DROP removes the table itself along with its rows, structure, indexes and constraints, so any query against it will error. Use TRUNCATE to empty a table you intend to refill, and DROP only when you want the table gone.<\/p>\n<h3>Can DDL commands be rolled back?<\/h3>\n<p>In most databases, no. DDL statements auto-commit, meaning the change is saved as soon as it runs and there is no pending transaction to reverse. PostgreSQL is a notable exception and supports transactional DDL, so a CREATE or ALTER inside a transaction block can be rolled back there. Never assume this behaviour without checking your specific database.<\/p>\n<h3>Which DDL command changes an existing table?<\/h3>\n<p>ALTER. It adds columns, removes them, changes a column&#8217;s data type or size, renames columns, and adds or drops constraints. The exact keyword for changing a column type varies by database: MySQL and Oracle use MODIFY, while SQL Server and PostgreSQL use ALTER COLUMN.<\/p>\n<h3>Do I need to know DDL to become a data analyst?<\/h3>\n<p>You need to understand it, but you will not write it every day. Analysts spend most of their SQL time on SELECT queries against tables that already exist. DDL becomes relevant when you build your own staging tables, and it comes up in interviews as a test of whether you understand the difference between a database&#8217;s structure and its contents.<\/p>\n<h2>Learn SQL properly, not in fragments<\/h2>\n<p>DDL is one hour of a real SQL curriculum. The parts that take longer, and that actually decide whether you can do the job, are joins across several tables, window functions, and query performance on tables large enough to be slow.<\/p>\n<p>SkilloVilla&#8217;s <a href=\"https:\/\/www.skillovilla.com\/courses\/sql-beginner-to-advanced\">SQL: Beginner to Advanced course<\/a> covers the language end to end with live teaching and mentor support, at \u20b933,110. If you want SQL as part of a full analytics path rather than on its own, the <a href=\"https:\/\/www.skillovilla.com\/tracks\/data-analytics-python\">Data Analytics with Python track<\/a> at \u20b971,999, currently \u20b958,999 places it alongside Python, statistics and the placement support that follows.<\/p>\n<p>Fees and ratings last checked August 2026; confirm current numbers with the provider before enrolling.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DDL commands in SQL explained with syntax and examples: CREATE, ALTER, DROP, TRUNCATE and RENAME, and how they differ from DML.<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[200],"tags":[],"class_list":["post-3871","post","type-post","status-publish","format-standard","hentry","category-data-analytics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained\" \/>\n<meta property=\"og:description\" content=\"DDL commands in SQL explained with syntax and examples: CREATE, ALTER, DROP, TRUNCATE and RENAME, and how they differ from DML.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\" \/>\n<meta property=\"og:site_name\" content=\"SkilloVilla\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-16T19:00:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-16T19:00:38+00:00\" \/>\n<meta name=\"author\" content=\"SkilloVilla Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"SkilloVilla Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\"},\"author\":{\"name\":\"SkilloVilla Team\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/f64a2675b6d238b7e44744a87e5c4943\"},\"headline\":\"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained\",\"datePublished\":\"2026-09-16T19:00:15+00:00\",\"dateModified\":\"2026-09-16T19:00:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\"},\"wordCount\":1840,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#organization\"},\"articleSection\":[\"Data analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\",\"url\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\",\"name\":\"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained\",\"isPartOf\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#website\"},\"datePublished\":\"2026-09-16T19:00:15+00:00\",\"dateModified\":\"2026-09-16T19:00:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.skillovilla.com\/blogs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#website\",\"url\":\"https:\/\/www.skillovilla.com\/blogs\/\",\"name\":\"SkilloVilla\",\"description\":\"Data careers, taught live\",\"publisher\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.skillovilla.com\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#organization\",\"name\":\"SkilloVilla\",\"url\":\"https:\/\/www.skillovilla.com\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.skillovilla.com\/blogs\/wp-content\/uploads\/2021\/07\/logo-thumbnail.png\",\"contentUrl\":\"https:\/\/www.skillovilla.com\/blogs\/wp-content\/uploads\/2021\/07\/logo-thumbnail.png\",\"width\":1200,\"height\":627,\"caption\":\"SkilloVilla\"},\"image\":{\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/f64a2675b6d238b7e44744a87e5c4943\",\"name\":\"SkilloVilla Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5e0b6f9e8405f5d6fc302700051e351ffa38fb1cf2709a0cb4e96b5622c497d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5e0b6f9e8405f5d6fc302700051e351ffa38fb1cf2709a0cb4e96b5622c497d0?s=96&d=mm&r=g\",\"caption\":\"SkilloVilla Team\"},\"url\":\"https:\/\/www.skillovilla.com\/blogs\/author\/sankalp_agarwal\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql","og_locale":"en_US","og_type":"article","og_title":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained","og_description":"DDL commands in SQL explained with syntax and examples: CREATE, ALTER, DROP, TRUNCATE and RENAME, and how they differ from DML.","og_url":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql","og_site_name":"SkilloVilla","article_published_time":"2026-09-16T19:00:15+00:00","article_modified_time":"2026-09-16T19:00:38+00:00","author":"SkilloVilla Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"SkilloVilla Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#article","isPartOf":{"@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql"},"author":{"name":"SkilloVilla Team","@id":"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/f64a2675b6d238b7e44744a87e5c4943"},"headline":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained","datePublished":"2026-09-16T19:00:15+00:00","dateModified":"2026-09-16T19:00:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql"},"wordCount":1840,"commentCount":0,"publisher":{"@id":"https:\/\/www.skillovilla.com\/blogs\/#organization"},"articleSection":["Data analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql","url":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql","name":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained","isPartOf":{"@id":"https:\/\/www.skillovilla.com\/blogs\/#website"},"datePublished":"2026-09-16T19:00:15+00:00","dateModified":"2026-09-16T19:00:38+00:00","breadcrumb":{"@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.skillovilla.com\/blogs\/ddl-commands-in-sql#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skillovilla.com\/blogs"},{"@type":"ListItem","position":2,"name":"DDL Commands in SQL: CREATE, ALTER, DROP and TRUNCATE Explained"}]},{"@type":"WebSite","@id":"https:\/\/www.skillovilla.com\/blogs\/#website","url":"https:\/\/www.skillovilla.com\/blogs\/","name":"SkilloVilla","description":"Data careers, taught live","publisher":{"@id":"https:\/\/www.skillovilla.com\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skillovilla.com\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skillovilla.com\/blogs\/#organization","name":"SkilloVilla","url":"https:\/\/www.skillovilla.com\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/www.skillovilla.com\/blogs\/wp-content\/uploads\/2021\/07\/logo-thumbnail.png","contentUrl":"https:\/\/www.skillovilla.com\/blogs\/wp-content\/uploads\/2021\/07\/logo-thumbnail.png","width":1200,"height":627,"caption":"SkilloVilla"},"image":{"@id":"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/f64a2675b6d238b7e44744a87e5c4943","name":"SkilloVilla Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skillovilla.com\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5e0b6f9e8405f5d6fc302700051e351ffa38fb1cf2709a0cb4e96b5622c497d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5e0b6f9e8405f5d6fc302700051e351ffa38fb1cf2709a0cb4e96b5622c497d0?s=96&d=mm&r=g","caption":"SkilloVilla Team"},"url":"https:\/\/www.skillovilla.com\/blogs\/author\/sankalp_agarwal"}]}},"_links":{"self":[{"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/posts\/3871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/comments?post=3871"}],"version-history":[{"count":1,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/posts\/3871\/revisions"}],"predecessor-version":[{"id":3872,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/posts\/3871\/revisions\/3872"}],"wp:attachment":[{"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/media?parent=3871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/categories?post=3871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skillovilla.com\/blogs\/wp-json\/wp\/v2\/tags?post=3871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}