<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":4872,"date":"2022-09-27T10:48:22","date_gmt":"2022-09-27T10:48:22","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=4872"},"modified":"2022-09-27T10:48:22","modified_gmt":"2022-09-27T10:48:22","slug":"what-are-the-different-types-of-sql-commands","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/","title":{"rendered":"What are the different types of SQL commands ?"},"content":{"rendered":"<ul>\n<li style=\"text-align: justify;\">DDL (Data Definition Language)<\/li>\n<li style=\"text-align: justify;\">DML (Data Manipulation Language)<\/li>\n<li style=\"text-align: justify;\">DCL (Data Control Language)<\/li>\n<li style=\"text-align: justify;\">TCL (Transaction Control Language)<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4873 aligncenter\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg\" alt=\"\" width=\"535\" height=\"294\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg 535w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands-300x165.jpg 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands-390x214.jpg 390w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/p>\n<h3 id=\"ddldata-definition-language\" style=\"text-align: justify;\"><strong>DDL(Data Definition Language)<\/strong><\/h3>\n<ul style=\"text-align: justify;\">\n<li>DDL is a syntax that is used for creating SQL commands. It is called as DDL becuase it defines the syntax for creating a data base.<\/li>\n<li>DDL is part of SQL which defines the data structure of the database at the initial stage when creating a database \u00a0and is also used for creating and modification of the structure of the database.<\/li>\n<\/ul>\n<h4 id=\"commands-in-ddl-are\" style=\"text-align: justify;\"><strong>Commands in DDL are<\/strong><\/h4>\n<ul style=\"text-align: justify;\">\n<li><strong>Create table<\/strong><strong>:<\/strong> This command is used to create a table in a database or its objects (like table, index, function, views, store procedure, and triggers).<\/li>\n<li><strong>Alter table<\/strong><strong>:<\/strong> This is used to alter the structure of the database.<\/li>\n<li><strong>Drop table<\/strong><strong>:<\/strong> This command is used to delete objects from the database.<\/li>\n<\/ul>\n<h3 id=\"data-manipulation-language\" style=\"text-align: justify;\"><strong>Data Manipulation Language<\/strong><\/h3>\n<ul style=\"text-align: justify;\">\n<li>DML uses the existing data base for manipulation of data.<\/li>\n<li>It helps users to retreive the data and perform manipulation on the data like inserting data, updating data, and deleting data using the following data manipulation commands like insert, update and delete.<\/li>\n<\/ul>\n<h3 id=\"data-control-language\" style=\"text-align: justify;\"><strong>Data Control Language<\/strong><\/h3>\n<ul style=\"text-align: justify;\">\n<li>As the name suggests data control language provides control for accessing the data in the database.<\/li>\n<li>These commands are usually used for providing previlages and controls to users who likes to access the database.<\/li>\n<li>Commands used in DCL for control and user previlages are Grant and Revoke.<\/li>\n<\/ul>\n<h3 id=\"transaction-control-language\" style=\"text-align: justify;\"><strong>Transaction Control Language<\/strong><\/h3>\n<ul style=\"text-align: justify;\">\n<li>TCL command statements are used to control changes made by the DML commands.<\/li>\n<li>It also authorizes the statements to assemble in conjunction into logical transactions.<\/li>\n<li>The commands that are used in TCL are Commit, Rollback, Savepoint, Begin, and Transaction.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>DDL (Data Definition Language) DML (Data Manipulation Language) DCL (Data Control Language) TCL (Transaction Control Language) DDL(Data Definition Language) DDL is a syntax that is used for creating SQL commands. It is called as DDL becuase it defines the syntax for creating a data base. DDL is part of SQL which defines the data structure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[6547],"tags":[18653,18650,18662,18664,18665,18652,18661,18663,18651,18658,18654,18655,18660,18657,18659,18656],"class_list":["post-4872","post","type-post","status-publish","format-standard","hentry","category-sql","tag-dcl-and-tcl-commands","tag-ddl","tag-ddl-commands","tag-ddl-commands-in-sql-with-syntax-and-examples","tag-ddl-commands-with-examples","tag-dml","tag-dml-commands","tag-dml-commands-in-sql-with-examples","tag-dql","tag-list-of-sql-commands-with-example","tag-sql-commands","tag-sql-commands-in-sql-server","tag-sql-commands-with-example","tag-types-of-sql-commands","tag-types-of-sql-commands-with-examples","tag-what-are-the-different-types-of-sql-commands"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What are the different types of SQL commands ? - SQL Commands<\/title>\n<meta name=\"description\" content=\"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL\" \/>\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.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are the different types of SQL commands ? - SQL Commands\" \/>\n<meta property=\"og:description\" content=\"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-27T10:48:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/\",\"name\":\"What are the different types of SQL commands ? - SQL Commands\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg\",\"datePublished\":\"2022-09-27T10:48:22+00:00\",\"dateModified\":\"2022-09-27T10:48:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg\",\"contentUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg\",\"width\":535,\"height\":294},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\/\/www.wikitechy.com\/interview-questions\"],\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What are the different types of SQL commands ? - SQL Commands","description":"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL","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.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/","og_locale":"en_US","og_type":"article","og_title":"What are the different types of SQL commands ? - SQL Commands","og_description":"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/","og_site_name":"Wikitechy","article_published_time":"2022-09-27T10:48:22+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg"}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/","name":"What are the different types of SQL commands ? - SQL Commands","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg","datePublished":"2022-09-27T10:48:22+00:00","dateModified":"2022-09-27T10:48:22+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What are the different types of SQL commands ? - DDL(Data Definition Language) - DML(Data Manipulation Language) - DCL - TCL","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/what-are-the-different-types-of-sql-commands\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/09\/sql-commands.jpg","width":535,"height":294},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=4872"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4872\/revisions"}],"predecessor-version":[{"id":4874,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4872\/revisions\/4874"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=4872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=4872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=4872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}