

{"id":158848,"date":"2022-11-11T10:00:00","date_gmt":"2022-11-11T04:30:00","guid":{"rendered":"https:\/\/www.jigsawacademy.com\/?p=158848"},"modified":"2022-11-24T14:22:44","modified_gmt":"2022-11-24T08:52:44","slug":"blogs-business-analytics-dml-commands","status":"publish","type":"post","link":"https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/dml-commands\/","title":{"rendered":"Elaborate In Detail: DML Commands in SQL | UNext Jigsaw"},"content":{"rendered":"\r\n<h2><strong>Introduction<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>In the 21st century, data is the new oil. Every application, software, device, and equipment has some form of data or information that humans can optimize to make it favorable for them. Businesses now understand the importance of data collection and storage and leveraging them to aid their decision-making process. Databases, i.e., information stored digitally in rows and columns, are fundamental to an\u00a0 IT organization. The handling and maintenance of these databases require a steep learning curve for the best results. Therefore, understanding data manipulation commands (DML Commands) is of utmost importance.<\/p>\r\n\r\n\r\n\r\n<p>Many Relational Database Management Systems (RDBMS) is used to manage databases, such as MS Access, Oracle, Postgres, MySQL, SQLite, SQL Server, etc. Structure Query Language, also known as SQL, is one of the most popular database languages.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Here, in this article, we&#8217;ll look at the Commands of SQL and its syntax to define the different aspects of various Relational Database Management Systems (RDBMS).<a class=\"all-link\">\u00a0<\/a><\/p>\r\n<h2 class=\"has-vivid-cyan-blue-color has-text-color\"><strong>Types of Commands in SQL\u00a0<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>The main types of commands present in SQL are:<\/p>\r\n\r\n\r\n\r\n<ol>\r\n<li><strong><a class=\"rank-math-link\" href=\"#DDL\">Data Definition Language (DDL)<\/a><\/strong><\/li>\r\n<li><strong><a class=\"rank-math-link\" href=\"#DML\">Data Manipulation Language (DML)<\/a><\/strong><\/li>\r\n<li><strong><a class=\"rank-math-link\" href=\"#DCL\">Data Control Language (DCL)<\/a><\/strong><\/li>\r\n<li><strong><a class=\"rank-math-link\" href=\"#TCL\">Transaction Control Language (TCL)<\/a><\/strong><\/li>\r\n<li><strong><a class=\"rank-math-link\" href=\"#DQL\">Data Query Language (DQL)<\/a><\/strong><\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>Take a look at some of the commands of SQL queries in this picture:<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p><strong>Figure<\/strong>: SQL Commands\u00a0<a class=\"rank-math-link\" href=\"https:\/\/www.guru99.com\/sql-commands-dbms-query.html\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">source<\/a><\/p>\r\n\r\n\r\n\r\n\r\n\r\n<h3 id=\"DDL\" class=\"has-vivid-cyan-blue-color has-text-color\">1) <strong>DDL<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>DDL is an abbreviation for Data Definition Language. DDL is used to define the schema or the structure of a database. Here are the main DDL commands of SQL with their syntax.<\/p>\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>CREATE<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The Create command is used to build new tables, views, and databases in DBMS.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Create table table_name (Datatypes, Column_name[,\u2026]);<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Create table mines;Create view for_learn;Create database sqltutorial;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>DROP<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Executing the Drop command in DDL can remove databases and tables from the RDBMS.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DROP table;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>For example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Drop table mines;Drop database;Drop object_type object_name;Drop view for_learn;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>ALTER<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The Alter command in DDL can change or modify the database structure.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<p>To add a new row in the table,<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>ALTER table table_name ADD row_name row-definition;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>And to make a change to an existing row in a given database,<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>ALTER Table Modify (Row Definition \u2026..);<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>For example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>ALTER table mines add subject varchar;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ol>\r\n<li>CRUD operations to create, read, update, and delete data<\/li>\r\n<li>Using the INSERT, SELECT, UPDATE and Delete commands.<\/li>\r\n<\/ol>\r\n\r\n<p>DML commands are often part of a more extensive database language, for instance, SQL (Structure Query Language). These DML commands may have a specific syntax to manage data in that language.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>DML Commands provide a way to precisely read, update, delete, or merge data. In the beginning, DML commands were part of computer programs only, but with the popularity of SQL, they have now become a part of database management.<\/p>\r\n\r\n\r\n\r\n<p>Data Manipulation Languages (DML) have two primary classifications: Procedural and Non-procedural programming (declarative programming).<\/p>\r\n\r\n\r\n\r\n<h3 id=\"DCL\" class=\"has-vivid-cyan-blue-color has-text-color\">3) <strong>DCL<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Data Control Language (DCL) provides commands to add more rights and permissions to different aspects of database parameters inside an RDBMS. Grant and Revoke are part of the DCL command in SQL.<\/p>\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>Grant<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The Grant command adds access privileges to a specific database.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>GRANT SELECT, UPDATE ON TABLE_NAME to USER, SPECIFIC_USER;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>GRANT SELECT ON Users to Sam@admin;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>Revoke<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The Revoke command provides a way to remove specific permissions from the given user.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>REVOKE privilege_nameON object_nameFROM {user_name |PUBLIC |role_name}<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>REVOKE SELECT, UPDATE ON student FROM BBA, MBA;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<h3 id=\"TCL\" class=\"has-vivid-cyan-blue-color has-text-color\">4) <strong>TCL<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Transaction Control Language or TCL represents the transactions in query handling in RDBMS. Commit, Rollback, and SAVEPOINT are the three main TCL commands.<\/p>\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>Commit<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The Commit command saves all the transactions to a specific database.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Commit;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM StudentsWHERE AdmissionNo = 35;Commit;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>Rollback<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The rollback command allows you to return or undo any transaction that is not present in the database.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>ROLLBACK;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM StudentsWHERE AdmissionNo = 35;ROLLBACK;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>SAVEPOINT<\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Here is the syntax for SAVEPOINT to specify and set a savepoint in the transaction.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SAVEPOINT SAVEPOINT_NAME;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>\u00a0Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SAVEPOINT AdmissionNo;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<h3 id=\"DQL\" class=\"has-vivid-cyan-blue-color has-text-color\">5) <strong>DQL<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>DQL, also known as Data Query Language (DQL), comprises the main commands used to fetch information or data from a database.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>SELECT is the primary fundamental query command used with FROM and to give direction to the commands.<\/p>\r\n\r\n\r\n\r\n<ol>\r\n<li>SELECT: Command to choose\/select an attribute from its condition defined by the WHERE condition.\r\n\r\n<\/li>\r\n<li>FROM: Defines the relation for taking input or values for selection in the query.\r\n\r\n<\/li>\r\n<li>WHERE: Defines the conditions to get specific results.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>For instance:<\/p>\r\n\r\n\r\n\r\n<p>SELECT writer_name<\/p>\r\n\r\n\r\n\r\n<p>FROM book_writer<\/p>\r\n\r\n\r\n\r\n<p>WHERE age &gt; 60;<\/p>\r\n\r\n\r\n\r\n<p>This query or command will fetch the list of writers who have written books and are aged more than 60.<\/p>\r\n<h2><strong>List of DML Commands in SQL<\/strong><\/h2>\r\n<p>Here is a short list of all DML commands and their specific functions in the SQL programming language.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<ol>\r\n<li>SELECT: Command to fetch data or values from the database<\/li>\r\n<li>INSERT: Command to add new or fresh value to the database<\/li>\r\n<li>UPDATE: Command to change or update the present\/existing data to a newer value inside the database<\/li>\r\n<li>DELETE: Command to remove or delete the values or data information from the database&#8217;s current table<\/li>\r\n<li>MERGE: Command to merge two or more data tables inside a database.<\/li>\r\n<\/ol>\r\n<p>\r\n\r\n<\/p>\r\n<h2><strong>The Syntax for DML Commands<\/strong><\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<ul>\r\n<li><strong>INSERT<\/strong><\/li>\r\n<\/ul>\r\n<p>\r\n\r\n<\/p>\r\n<p>The INSERT query command in SQL provides a way to add new rows of information or data inside a specific database of the RDBMS. INSERT can be executed using two syntaxes:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Syntax:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO TABLE_NAME (column1, column2, column3,&#8230;columnN)<br \/>VALUES (value1, value2, value3,&#8230;valueN);\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Here \u2018column\u2019 represents the table column&#8217;s specific names for inserting data in the desired way.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>You may avoid the column name and add the values previously defined in the column.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO TABLE_NAME VALUES (value1,value2,value3,&#8230;valueN);<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Example:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Here is an example of adding five records to the customer database table:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (1, Kritesh, 45, &#8216;Delhi&#8217;, 2500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (2, Mehta, 35,Kochi, 1500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (3, Preet, 32, Delhi, 7000.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (4, Sonali, 52, &#8216;Kolkata&#8217;, 3500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (5, Ritwik, 56, Noida, 8500.00 );\u00a0\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>And using the second syntax, you can add the record as that too:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO CUSTOMERS VALUES (6, &#8216;Shubhra&#8217;, 45, &#8216;MP&#8217;, 4500.00 );<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>And all the above records will fetch the following result on checking the CUSTOMERS table as follows:\u00a0<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Noida\u00a0 \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n\r\n\r\n<\/p>\r\n<ul>\r\n<li><strong>UPDATE<\/strong><\/li>\r\n<\/ul>\r\n<p>\r\n\r\n<\/p>\r\n<p>The Update command provides a way to make changes\/update or modify the values present in a table\u2019s column.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Syntax:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>UPDATE table_nameSET column1 = value1, column2 = value2&#8230;., columnN = valueNWHERE [condition];<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>You can add more conditions using OR or AND operators to make multiple changes using a single query.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Let\u2019s consider the above example.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Noida\u00a0 \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Now you can update the address of the 5th customer with the following UPDATE Query.<a class=\"all-link\">\u00a0<\/a><\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; UPDATE CUSTOMERS SET ADDRESS = &#8216;Indore&#8217;WHERE ID = 5;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>On checking, the customer records will fetch the following result:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>And in case you are looking to change the Salary and address of the whole customer database, you can do so with the help of the below-mentioned query:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; UPDATE CUSTOMERS SET ADDRESS = &#8216;Indore&#8217;, SALARY = 3000.00;<strong>\u00a0<\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<a href=\"https:\/\/www.jigsawacademy.com\/integrated-program-in-business-analytics\/?leadsource=Blog&amp;utm_source=Blog&amp;utm_campaign=banner-2\" target=\"_blank\" rel=\"noopener\">\u00a0<\/a><\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Indore\u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Indore\u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 3000.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n\r\n\r\n<\/p>\r\n<ul>\r\n<li><strong>DELETE<\/strong><\/li>\r\n<\/ul>\r\n<p>\r\n\r\n<\/p>\r\n<p>The Delete command provides a way to delete a single column or multiple columns from a table\u2019s specific row.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Syntax:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM table_name<br \/>[WHERE condition];\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>You can use a combination of different operators to get more specific or precise results.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Example:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>And the DELETE query for ID 3 would then be:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; DELETE FROM CUSTOMERS WHERE ID = 3;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Now the database will look something like this:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>You can also the use following command to DELETE all customers from a given database:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; DELETE FROM CUSTOMERS;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p>\r\n\r\n\r\n\r\n<\/p>\r\n<p>This will delete all records of the customers from a specific database, respectively.<\/p>\r\n<h2><b>DML Statements and Transactions<\/b><\/h2>\r\n<h4><b>DML<\/b><span style=\"font-weight: 400;\">\u00a0Statements:<\/span><\/h4>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Database table data can be added, changed, or deleted using Data Manipulation Language (DML) statements.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>DML<\/b><span style=\"font-weight: 400;\">\u00a0Statements access the data and process\/change the existing tables.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">In the SQL environment, DML statements are entered after the SQL&gt; prompt \u00a0<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>DML<\/b><span style=\"font-weight: 400;\"> statements are entered in the Worksheet in the SQL Developer environment. The SQL Developer Connections frame and tools can be used to access and manipulate data.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The effect of a DML statement is not permanent until the transaction that includes it is committed.<\/span><\/li>\r\n<\/ul>\r\n<h4><b>Transaction control statements<\/b><\/h4>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A transaction is a set of one or multiple SQL statements that the DBMS treats as one unit (single command): either all of the statements are executed or none of them are.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Transactions are required when writing code for business processes that require multiple operations to be performed as a unit simultaneously.<\/span><\/li>\r\n<\/ul>\r\n<p><span style=\"font-weight: 400;\">For example, when a team leader (TL) quits the company, a row has to be inserted into the JOB_ HISTORY table to show when the team leader left, and the value of TL_ID has to be updated against each of his team members in the EMPLOYEES table. To execute this process in a business application, the &#8216;INSERT&#8217; and &#8216;UPDATE&#8217; <\/span><b>DML commands<\/b><span style=\"font-weight: 400;\">\u00a0must be combined into a single transaction.<\/span><\/p>\r\n<h2><span data-contrast=\"auto\">Why use DML Commands?<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\r\n<p><span data-contrast=\"auto\">DML commands have the following applications:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\r\n<ul>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Using DML statements allows you to modify whatever data is stored in a database.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">These commands allow users to specify what data is needed.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">It offers several different flavors and capabilities between database vendors.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\"><span data-contrast=\"auto\">It facilitates effective and clear human interaction with the system.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<\/ul>\r\n<p>\r\n\r\n\r\n\r\n<\/p>\r\n<p>\r\n\r\n<\/p>\r\n\r\n\r\n\r\n<h2 class=\"has-vivid-cyan-blue-color has-text-color\"><strong>Difference Between DDL and DML Commands<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>Here are the main differences between DDL and DML commands in RDBMS:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-stripes\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>\u00a0<\/td>\r\n<td><strong>DDL Commands<\/strong><\/td>\r\n<td><strong>DML Commands<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Full-Form<\/td>\r\n<td>Data Definition Language<\/td>\r\n<td>Data Manipulation Language<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Main Purpose<\/td>\r\n<td>DDL commands are mainly used to create new databases, users, constraints, tables, constraints, etc.<\/td>\r\n<td>The primary purpose of DML commands is to select, insert, delete, update, and merge data records in RDBMS.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Further Classification<\/td>\r\n<td>None.<\/td>\r\n<td>DML is further classified into two types: Procedural DML, Non-procedural DML<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Commands Example<\/td>\r\n<td>CREATE, ALTER, DROP, and RENAME<\/td>\r\n<td>SELECT, INSERT, UPDATE, DELETE, and MERGE<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<h2><strong>Conclusion\u00a0<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>SQL is one of the primary database management languages. Commands of SQL have different types and syntaxes that allow you to manage data precisely and deliver optimum results.<\/p>\r\n\r\n\r\n\r\n<p>There are five different types of commands within DDL, DML, DCL, TCL, and DQL. Each type has a specific function and role to perform in the programming language.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>With both public and private organizations now depending on data to run their operations, data management has become one of the most crucial tools in today&#8217;s times. With continued improvisation in technologies, storage, and IT solutions, data manipulation will remain an area of much interest for younger generations.<\/p>\r\n\r\n\r\n\r\n<p>Software is designed mainly to make life easy. The database is an integral part of the software. Any user interface that collects data from the user is stored in a database. This database is used for further reference. We have all received customer calls if our accounts have not been active for some time. The customer care officials take the data from the database from the column&#8217; last active&#8217; in the table and call the customers.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Finding the right place to learn and become proficient in all these skills and languages is also important. Jigsaw Academy, recognized as one of the Top 10 Data Science Institutes in India, is the right place for you. Jigsaw Academy offers an <strong><a class=\"rank-math-link\" href=\"https:\/\/www.jigsawacademy.com\/integrated-program-in-business-analytics\/\">Integrated Program In Business Analytics<\/a>\u00a0<\/strong>for enthusiasts in this field. The course runs for 10 months and is conducted live online. Learners are offered a joint certificate by the Indian Institute of Management, Indore, and UNext Jigsaw.<\/p>\r\n\r\n\r\n\r\n<h2>Also, Read<\/h2>\r\n\r\n\r\n\r\n<ul>\r\n<li><strong><a class=\"rank-math-link\" href=\"#https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/types-of-analytics\/\">Beginner&#8217;s Guide To 4 Types Of Analytics<\/a><\/strong><\/li>\r\n<li><strong><a href=\"https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/bottom-up-parsing\/\">Bottom Up Parsing: A Basic Concise Guide in 5 Points<\/a><\/strong><\/li>\r\n<li><strong><a href=\"https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/cohort-analysis\/\">Cohort Analysis: An Interesting Overview For 2021<\/a><\/strong><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<ul>\r\n<li><strong>TRUNCATE<\/strong><a class=\"all-link\">\u00a0<\/a><\/li>\r\n<\/ul>\r\n\r\n<p>When executed, the Truncate command in DDL can remove or delete all rows from a specific table and clear or free the table, respectively.<\/p>\r\n\r\n\r\n\r\n<p>Syntax:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>TRUNCATE TABLE table_name;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>TRUNCATE table mines;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n\r\n\r\n<h3 id=\"DML\" class=\"has-vivid-cyan-blue-color has-text-color\">2) <strong>DML<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>DML is an abbreviation for Data Manipulation Language.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Data Manipulation Language or DML represents a collection of programming languages explicitly used to make changes in the database, such as:<\/p>\r\n\r\n\r\n<!-- wp:list {\"ordered\":true} -->\r\n<ol>\r\n<li>CRUD operations to create, read, update, and delete data<\/li>\r\n<li>Using the INSERT, SELECT, UPDATE and Delete commands.<\/li>\r\n<\/ol>\r\n<!-- wp:paragraph -->\r\n<p>DML commands are often part of a more extensive database language, for instance, SQL (Structure Query Language). These DML commands may have a specific syntax to manage data in that language.\u00a0<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>DML Commands provide a way to precisely read, update, delete, or merge data. In the beginning, DML commands were part of computer programs only, but with the popularity of SQL, they have now become a part of database management.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Data Manipulation Languages (DML) have two primary classifications: Procedural and Non-procedural programming (declarative programming).<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3 id=\"DCL\" class=\"has-vivid-cyan-blue-color has-text-color\">3) <strong>DCL<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Data Control Language (DCL) provides commands to add more rights and permissions to different aspects of database parameters inside an RDBMS. Grant and Revoke are part of the DCL command in SQL.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong>Grant<\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The Grant command adds access privileges to a specific database.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Syntax:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>GRANT SELECT, UPDATE ON TABLE_NAME to USER, SPECIFIC_USER;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Example:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>GRANT SELECT ON Users to Sam@admin;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong>Revoke<\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The Revoke command provides a way to remove specific permissions from the given user.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Syntax:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>REVOKE privilege_nameON object_nameFROM {user_name |PUBLIC |role_name}<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Example:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>REVOKE SELECT, UPDATE ON student FROM BBA, MBA;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"textColor\":\"vivid-cyan-blue\"} -->\r\n<h3 id=\"TCL\" class=\"has-vivid-cyan-blue-color has-text-color\">4) <strong>TCL<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Transaction Control Language or TCL represents the transactions in query handling in RDBMS. Commit, Rollback, and SAVEPOINT are the three main TCL commands.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong>Commit<\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The Commit command saves all the transactions to a specific database.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Syntax:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Commit;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Example:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM StudentsWHERE AdmissionNo = 35;Commit;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong>Rollback<\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The rollback command allows you to return or undo any transaction that is not present in the database.\u00a0<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Syntax:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>ROLLBACK;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Example:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM StudentsWHERE AdmissionNo = 35;ROLLBACK;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong>SAVEPOINT<\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Here is the syntax for SAVEPOINT to specify and set a savepoint in the transaction.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Syntax:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SAVEPOINT SAVEPOINT_NAME;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>\u00a0Example:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} -->\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SAVEPOINT AdmissionNo;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"textColor\":\"vivid-cyan-blue\"} -->\r\n<h3 id=\"DQL\" class=\"has-vivid-cyan-blue-color has-text-color\">5) <strong>DQL<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>DQL, also known as Data Query Language (DQL), comprises the main commands used to fetch information or data from a database.\u00a0<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>SELECT is the primary fundamental query command used with FROM and to give direction to the commands.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list {\"ordered\":true} -->\r\n<ol>\r\n<li>SELECT: Command to choose\/select an attribute from its condition defined by the WHERE condition.<!-- \/wp:list -->\r\n\r\n<!-- wp:list {\"ordered\":true,\"start\":2} --><\/li>\r\n<li>FROM: Defines the relation for taking input or values for selection in the query.<!-- \/wp:list -->\r\n\r\n<!-- wp:list {\"ordered\":true,\"start\":3} --><\/li>\r\n<li>WHERE: Defines the conditions to get specific results.<\/li>\r\n<\/ol>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>For instance:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>SELECT writer_name<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>FROM book_writer<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>WHERE age &gt; 60;<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This query or command will fetch the list of writers who have written books and are aged more than 60.<\/p>\r\n<h2><strong>List of DML Commands in SQL<\/strong><\/h2>\r\n<p>Here is a short list of all DML commands and their specific functions in the SQL programming language.<\/p>\r\n<p><!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list {\"ordered\":true} --><\/p>\r\n<ol>\r\n<li>SELECT: Command to fetch data or values from the database<\/li>\r\n<li>INSERT: Command to add new or fresh value to the database<\/li>\r\n<li>UPDATE: Command to change or update the present\/existing data to a newer value inside the database<\/li>\r\n<li>DELETE: Command to remove or delete the values or data information from the database&#8217;s current table<\/li>\r\n<li>MERGE: Command to merge two or more data tables inside a database.<\/li>\r\n<\/ol>\r\n<p><!-- \/wp:list -->\r\n\r\n<!-- wp:heading {\"level\":3} --><\/p>\r\n<h2><strong>The Syntax for DML Commands<\/strong><\/h2>\r\n<p><!-- \/wp:heading -->\r\n\r\n<!-- wp:list --><\/p>\r\n<ul>\r\n<li><strong>INSERT<\/strong><\/li>\r\n<\/ul>\r\n<p><!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>The INSERT query command in SQL provides a way to add new rows of information or data inside a specific database of the RDBMS. INSERT can be executed using two syntaxes:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Syntax:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO TABLE_NAME (column1, column2, column3,&#8230;columnN)<br \/>VALUES (value1, value2, value3,&#8230;valueN);\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Here \u2018column\u2019 represents the table column&#8217;s specific names for inserting data in the desired way.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>You may avoid the column name and add the values previously defined in the column.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO TABLE_NAME VALUES (value1,value2,value3,&#8230;valueN);<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Example:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Here is an example of adding five records to the customer database table:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (1, Kritesh, 45, &#8216;Delhi&#8217;, 2500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (2, Mehta, 35,Kochi, 1500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (3, Preet, 32, Delhi, 7000.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (4, Sonali, 52, &#8216;Kolkata&#8217;, 3500.00 );\u00a0INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (5, Ritwik, 56, Noida, 8500.00 );\u00a0\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>And using the second syntax, you can add the record as that too:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>INSERT INTO CUSTOMERS VALUES (6, &#8216;Shubhra&#8217;, 45, &#8216;MP&#8217;, 4500.00 );<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>And all the above records will fetch the following result on checking the CUSTOMERS table as follows:\u00a0<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Noida\u00a0 \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list --><\/p>\r\n<ul>\r\n<li><strong>UPDATE<\/strong><\/li>\r\n<\/ul>\r\n<p><!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>The Update command provides a way to make changes\/update or modify the values present in a table\u2019s column.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Syntax:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>UPDATE table_nameSET column1 = value1, column2 = value2&#8230;., columnN = valueNWHERE [condition];<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>You can add more conditions using OR or AND operators to make multiple changes using a single query.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Let\u2019s consider the above example.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Noida\u00a0 \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Now you can update the address of the 5th customer with the following UPDATE Query.<a class=\"all-link\">\u00a0<\/a><\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; UPDATE CUSTOMERS SET ADDRESS = &#8216;Indore&#8217;WHERE ID = 5;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>On checking, the customer records will fetch the following result:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>And in case you are looking to change the Salary and address of the whole customer database, you can do so with the help of the below-mentioned query:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; UPDATE CUSTOMERS SET ADDRESS = &#8216;Indore&#8217;, SALARY = 3000.00;<strong>\u00a0<\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<a href=\"https:\/\/www.jigsawacademy.com\/integrated-program-in-business-analytics\/?leadsource=Blog&amp;utm_source=Blog&amp;utm_campaign=banner-2\" target=\"_blank\" rel=\"noopener\">\u00a0<\/a><\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Indore\u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Indore\u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 3000.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 3000.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list --><\/p>\r\n<ul>\r\n<li><strong>DELETE<\/strong><\/li>\r\n<\/ul>\r\n<p><!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>The Delete command provides a way to delete a single column or multiple columns from a table\u2019s specific row.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Syntax:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>DELETE FROM table_name<br \/>[WHERE condition];\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>You can use a combination of different operators to get more specific or precise results.<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Example:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 3 | Preet\u00a0 \u00a0 |\u00a0 32 | Delhi |\u00a0 7000.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>And the DELETE query for ID 3 would then be:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; DELETE FROM CUSTOMERS WHERE ID = 3;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>Now the database will look something like this:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+| ID | NAME | AGE | ADDRESS \u00a0 | SALARY \u00a0 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+|\u00a0 1 | Kritesh \u00a0 |\u00a0 45 | Delhi \u00a0 |\u00a0 2500.00 ||\u00a0 2 | Mehta \u00a0 \u00a0 |\u00a0 35 | Kochi\u00a0 |\u00a0 1500.00 ||\u00a0 4 | Sonali\u00a0 \u00a0 |\u00a0 52 | Kolkata |\u00a0 3500.00 ||\u00a0 5 | Ritwik\u00a0 \u00a0 |\u00a0 56 | Indore \u00a0 \u00a0 |\u00a0 8500.00 ||\u00a0 6 | Shubhra \u00a0 |\u00a0 45 | MP\u00a0 \u00a0 |\u00a0 4500.00 |+&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>You can also the use following command to DELETE all customers from a given database:<\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-regular\"} --><\/p>\r\n<figure class=\"wp-block-table is-style-regular\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>SQL&gt; DELETE FROM CUSTOMERS;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<p><!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><\/p>\r\n<p>This will delete all records of the customers from a specific database, respectively.<\/p>\r\n<h2><b>DML Statements and Transactions<\/b><\/h2>\r\n<h4><b>DML<\/b><span style=\"font-weight: 400;\">\u00a0Statements:<\/span><\/h4>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Database table data can be added, changed, or deleted using Data Manipulation Language (DML) statements.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>DML<\/b><span style=\"font-weight: 400;\">\u00a0Statements access the data and process\/change the existing tables.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">In the SQL environment, DML statements are entered after the SQL&gt; prompt \u00a0<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>DML<\/b><span style=\"font-weight: 400;\"> statements are entered in the Worksheet in the SQL Developer environment. The SQL Developer Connections frame and tools can be used to access and manipulate data.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The effect of a DML statement is not permanent until the transaction that includes it is committed.<\/span><\/li>\r\n<\/ul>\r\n<h4><b>Transaction control statements<\/b><\/h4>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A transaction is a set of one or multiple SQL statements that the DBMS treats as one unit (single command): either all of the statements are executed or none of them are.<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Transactions are required when writing code for business processes that require multiple operations to be performed as a unit simultaneously.<\/span><\/li>\r\n<\/ul>\r\n<p><span style=\"font-weight: 400;\">For example, when a team leader (TL) quits the company, a row has to be inserted into the JOB_ HISTORY table to show when the team leader left, and the value of TL_ID has to be updated against each of his team members in the EMPLOYEES table. To execute this process in a business application, the &#8216;INSERT&#8217; and &#8216;UPDATE&#8217; <\/span><b>DML commands<\/b><span style=\"font-weight: 400;\">\u00a0must be combined into a single transaction.<\/span><\/p>\r\n<h2><span data-contrast=\"auto\">Why use DML Commands?<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\r\n<p><span data-contrast=\"auto\">DML commands have the following applications:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\r\n<ul>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Using DML statements allows you to modify whatever data is stored in a database.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">These commands allow users to specify what data is needed.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">It offers several different flavors and capabilities between database vendors.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\"><span data-contrast=\"auto\">It facilitates effective and clear human interaction with the system.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\r\n<\/ul>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"textColor\":\"vivid-cyan-blue\"} --><\/p>\r\n<p><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"textColor\":\"vivid-cyan-blue\"} --><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"textColor\":\"vivid-cyan-blue\"} -->\r\n<h2 class=\"has-vivid-cyan-blue-color has-text-color\"><strong>Difference Between DDL and DML Commands<\/strong><\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Here are the main differences between DDL and DML commands in RDBMS:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table {\"className\":\"is-style-stripes\"} -->\r\n<figure class=\"wp-block-table is-style-stripes\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>\u00a0<\/td>\r\n<td><strong>DDL Commands<\/strong><\/td>\r\n<td><strong>DML Commands<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Full-Form<\/td>\r\n<td>Data Definition Language<\/td>\r\n<td>Data Manipulation Language<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Main Purpose<\/td>\r\n<td>DDL commands are mainly used to create new databases, users, constraints, tables, constraints, etc.<\/td>\r\n<td>The primary purpose of DML commands is to select, insert, delete, update, and merge data records in RDBMS.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Further Classification<\/td>\r\n<td>None.<\/td>\r\n<td>DML is further classified into two types: Procedural DML, Non-procedural DML<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Commands Example<\/td>\r\n<td>CREATE, ALTER, DROP, and RENAME<\/td>\r\n<td>SELECT, INSERT, UPDATE, DELETE, and MERGE<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:paragraph --><!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading -->\r\n<h2><strong>Conclusion\u00a0<\/strong><\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>SQL is one of the primary database management languages. Commands of SQL have different types and syntaxes that allow you to manage data precisely and deliver optimum results.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>There are five different types of commands within DDL, DML, DCL, TCL, and DQL. Each type has a specific function and role to perform in the programming language.\u00a0<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>With both public and private organizations now depending on data to run their operations, data management has become one of the most crucial tools in today&#8217;s times. With continued improvisation in technologies, storage, and IT solutions, data manipulation will remain an area of much interest for younger generations.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Software is designed mainly to make life easy. The database is an integral part of the software. Any user interface that collects data from the user is stored in a database. This database is used for further reference. We have all received customer calls if our accounts have not been active for some time. The customer care officials take the data from the database from the column&#8217; last active&#8217; in the table and call the customers.\u00a0<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Finding the right place to learn and become proficient in all these skills and languages is also important. Jigsaw Academy, recognized as one of the Top 10 Data Science Institutes in India, is the right place for you. Jigsaw Academy offers an <strong><a class=\"rank-math-link\" href=\"https:\/\/www.jigsawacademy.com\/integrated-program-in-business-analytics\/\">Integrated Program In Business Analytics<\/a>\u00a0<\/strong>for enthusiasts in this field. The course runs for 10 months and is conducted live online. Learners are offered a joint certificate by the Indian Institute of Management, Indore, and UNext Jigsaw.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Also, Read<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:list -->\r\n<ul>\r\n<li><strong><a class=\"rank-math-link\" href=\"#https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/types-of-analytics\/\">Beginner&#8217;s Guide To 4 Types Of Analytics<\/a><\/strong><\/li>\r\n<li><strong><a href=\"https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/bottom-up-parsing\/\">Bottom Up Parsing: A Basic Concise Guide in 5 Points<\/a><\/strong><\/li>\r\n<li><strong><a href=\"https:\/\/www.jigsawacademy.com\/blogs\/business-analytics\/cohort-analysis\/\">Cohort Analysis: An Interesting Overview For 2021<\/a><\/strong><\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->","protected":false},"excerpt":{"rendered":"<p>Introduction In the 21st century, data is the new oil. Every application, software, device, and equipment has some form of data or information that humans can optimize to make it favorable for them. Businesses now understand the importance of data collection and storage and leveraging them to aid their decision-making process. Databases, i.e., information stored [&hellip;]<\/p>\n","protected":false},"author":2640,"featured_media":231139,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1210],"tags":[8749,8752,8753,8750,3027,8751,3024,3025,3026,3028],"form":[10307],"acf":[],"_links":{"self":[{"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/posts\/158848"}],"collection":[{"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/users\/2640"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/comments?post=158848"}],"version-history":[{"count":17,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/posts\/158848\/revisions"}],"predecessor-version":[{"id":260314,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/posts\/158848\/revisions\/260314"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/media\/231139"}],"wp:attachment":[{"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/media?parent=158848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/categories?post=158848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/tags?post=158848"},{"taxonomy":"form","embeddable":true,"href":"https:\/\/www.jigsawacademy.com\/wp-json\/wp\/v2\/form?post=158848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}