{"id":11873,"date":"2019-11-08T19:23:32","date_gmt":"2019-11-08T19:23:32","guid":{"rendered":"https:\/\/ittutorial.org\/?p=11873"},"modified":"2019-11-18T00:05:16","modified_gmt":"2019-11-18T00:05:16","slug":"changing-data","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/changing-data\/","title":{"rendered":"Oracle SQL Tutorial -6 Update Data In The Oracle Database"},"content":{"rendered":"<p align=\"left\"><span style=\"font-size: medium\">Hi ,<\/span><\/p>\n<p align=\"left\"><span lang=\"en-US\">In this article , I will explain topics such as updating data , deleting data from table and adding records to table .<\/span><\/p>\n<p align=\"left\"><span style=\"color: #ce181e\"><span style=\"font-size: large\"><span style=\"color: #21409a\"><span lang=\"en-US\">ADDING RECORD TO TABLE<\/span><\/span><\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The INSERT command is used when adding a new record to the table . To add a single record :<\/span> <\/span><\/span><\/p>\n<pre><span style=\"color: #000000\"><span style=\"font-size: large\"><i>INSERT INTO table [(column [ ,column ...] VALUES (value [ , value ...]);\r\n<\/i><\/span><\/span><\/pre>\n<pre><em>INSERT INTO ADMIN.ISCI(EMPLOYEE_ID,FIRST_NAME,LAST_NAME) VALUES (6,'Melike','Duran');<\/em><\/pre>\n<p><span style=\"color: #000000\"><span style=\"font-size: large\"><i> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11875\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/2.6-300x21.png\" alt=\"\" width=\"415\" height=\"29\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/2.6-300x21.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/2.6-768x54.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/2.6.png 961w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/> <\/i><\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #ce181e\"><span style=\"font-size: large\"><span style=\"color: #21409a\"><span lang=\"en-US\">ROW COPYING FROM ANOTHER TABLE<\/span><\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">We use subqueries when copying rows from another table . The VALUES statement is not used .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The number of columns in the INSERT statement with the subquery must be equal .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">All records from the subquery are INSERT .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<pre><em>INSERT INTO NEW_TABLE SELECT * FROM ISCI WHERE EMPLOYEE_ID=6;<\/em><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11877\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/4.6-300x22.png\" alt=\"\" width=\"436\" height=\"32\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/4.6-300x22.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/4.6-768x57.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/4.6.png 963w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #ce181e\"><span style=\"font-size: large\"><span style=\"color: #21409a\"><span lang=\"en-US\">UPDATING DATA IN THE TABLE<\/span><\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The UPDATE statement is used to update any data in the table . This statement can update multiple records at once .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<pre><em>INSERT INTO ADMIN.ISCI (EMPLOYEE_ID,FIRST_NAME,LAST_NAME,SALARY) VALUES (12,'Muzaffer','Kazan',1500);<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">In the query above , we added a new record to our table and entered the salary as 1500 . I&#8217;m going to update the salary data now .<\/span> <\/span><\/span><\/p>\n<pre><em>UPDATE ADMIN.ISCI SET SALARY=SALARY+500 WHERE EMPLOYEE_ID=12;<\/em><\/pre>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11880\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/7.6-300x41.png\" alt=\"\" width=\"417\" height=\"57\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/7.6-300x41.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/7.6-768x104.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/7.6.png 962w\" sizes=\"auto, (max-width: 417px) 100vw, 417px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">And when we run the above query , we just changed the salary value of the person we added to the table from 1500 to 2000 .<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Let&#8217;s make another example :<\/span><\/span><\/span><\/p>\n<pre><em>UPDATE OGRENCI SET BOLUM_ADI='Bilgisayar M\u00fchendisli\u011fi' WHERE BOLUM_ADI='Tarih';<\/em><\/pre>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12268\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update3-300x72.png\" alt=\"\" width=\"533\" height=\"128\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update3-300x72.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update3-768x185.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update3.png 810w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #ce181e\"><span style=\"font-size: large\"><span style=\"color: #000000\"><span lang=\"en-US\">This example changed a single field like our first example and now we will update two fields in a single query .<\/span><\/span><\/span><\/span><\/p>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12269\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update5-300x12.png\" alt=\"\" width=\"500\" height=\"20\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update5-300x12.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update5-768x30.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update5-800x32.png 800w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update5.png 815w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<pre><em>UPDATE OGRENCI SET AD='Aylin' , BOLUM_ADI='Gastronomi' WHERE OGRENCI_NO=17700;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\">In our student table , we will change both the name and the section name of the person whose ogrenci_no is 17700 . <\/span><\/span><\/p>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12270\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update-300x57.png\" alt=\"\" width=\"490\" height=\"93\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update-300x57.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update-768x145.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update-800x152.png 800w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/update.png 806w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #21409a\"><span style=\"font-size: large\"><span lang=\"en-US\">DELETING DATA FROM THE TABLE<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The DELETE command is used when we want to delete data from the table . With this command , we can delete more than one record at a time .<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: medium\">TRUNCATE : <\/span><\/span><span style=\"font-size: medium\"><span lang=\"en-US\">Used to delete all data in the table and is irreversible<\/span><\/span> <span style=\"color: #000000\"><span style=\"font-size: medium\">.<\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: medium\"><span lang=\"en-US\">TRUNCATE is a DDL command .<\/span><\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Now let&#8217;s look at the values in our table .<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11881\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/8.6-300x41.png\" alt=\"\" width=\"446\" height=\"61\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/8.6-300x41.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/8.6-768x104.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/8.6.png 962w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Our table looked like this after we just made an update , and now let&#8217;s delete Deniz from the table .<\/span> <\/span><\/span><\/p>\n<pre><em>DELETE FROM ADMIN.ISCI WHERE FIRST_NAME='deniz';<\/em><\/pre>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11883\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/9.6-300x30.png\" alt=\"\" width=\"420\" height=\"42\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/9.6-300x30.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/9.6-768x76.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/9.6.png 965w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Now let&#8217;s give an example of truncate .<\/span> <\/span><\/span><\/p>\n<pre><em>CREATE TABLE ADMIN.YENI_TABLO AS SELECT * FROM ADMIN.ISCI;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">First of all , we created a table named new_table by copying the <\/span><\/span><\/span><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">\u0131sc\u0131<\/span><\/span><\/span><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\"> table .<\/span><\/span><\/span> <span lang=\"en-US\">Then we delete this table with the truncate statement .<\/span><\/p>\n<pre><em>TRUNCATE TABLE ADMIN.YENI_TABLO;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">And now let&#8217;s check to see if our table has been deleted .<\/span> <\/span><\/span><\/p>\n<pre><em>SELECT * FROM ADMIN.YENI_TABLO;<\/em><\/pre>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11887\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/14.6.png\" alt=\"\" width=\"235\" height=\"50\" \/><\/p>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">This way we received a warning , so our table was completely deleted .<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #21409a\"><span style=\"font-size: large\">DATABASE TRANSACTIONS<\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">When we run a DML command , transaction starts . The transaction terminates in the following cases :<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">When a DDL or DCL command is executed ,<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">When the user has a logout ,<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">If the system fails ,<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">When Commit or Rollback commands are executed<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The transaction ends .<\/span> <\/span><\/span><\/p>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\">COMMIT &amp; ROLLBACK<\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\">ROLLBACK : <\/span><\/span><span lang=\"en-US\">Undo changes to data<\/span> <span style=\"color: #000000\"><span style=\"font-size: large\">.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\">COMMIT : <\/span><\/span><span lang=\"en-US\">Ensures that data changes are permanent<\/span> <span style=\"color: #000000\"><span style=\"font-size: large\">.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">These commands help you track data changes before you apply continuous changes.<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The changes made are controlled on a session basis .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\">SAVEPOINT<\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Used to put a record point in the current transaction .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\"><span lang=\"en-US\">BEFORE COMMIT OR ROLLBACK<\/span> <\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The transaction user will see the result of the change he made after SELECT and DML operations .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Other users cannot see the result of the DML operations performed by the user doing the operation .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The affected rows are locked , and other users cannot change the data on unaffected rows .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\"><span lang=\"en-US\">AFTER COMMIT<\/span> <\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Data changes made in the database are applied permanently<\/span> .<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">All users can see the current result .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The affected rows are unlocked .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">All SAVEPOINT points are deleted .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\">**<\/span><\/span><span lang=\"en-US\">When deleting a record from a table , if the transaction is not committed , the user can see the change but the process is not permanent and the other users cannot see the result of the transaction .<\/span><\/p>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11888\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/15.6-300x39.png\" alt=\"\" width=\"454\" height=\"59\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/15.6-300x39.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/15.6-768x100.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/15.6.png 954w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><\/p>\n<pre><em>DELETE FROM ADMIN.ISCI WHERE EMPLOYEE_ID=4;<\/em><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11890\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/17.6-300x30.png\" alt=\"\" width=\"430\" height=\"43\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/17.6-300x30.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/17.6-768x78.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/17.6.png 965w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/p>\n<pre><em>SELECT * FROM ADMIN.ISCI;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">We deleted the person with id above 4 , but this process did not happen permanently and now we commit it to make it permanent :<\/span><\/span><\/span><\/p>\n<pre><em>COMMIT;<\/em><\/pre>\n<pre><em>SELECT * FROM ADMIN.ISCI;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\"><span lang=\"en-US\">AFTER ROLLBACK<\/span> <\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Changes made to the data are undone .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">The records that are modified are released , the locks are removed .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">When uncommitted transaction Rollback is performed , unmodified data is retrieved from the Undo tablespace and the data becomes consistent .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11893\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/21.6-300x29.png\" alt=\"\" width=\"434\" height=\"42\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/21.6-300x29.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/21.6-768x76.png 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/21.6.png 956w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/p>\n<pre><em>DELETE FROM ADMIN.ISCI;<\/em><\/pre>\n<pre><em>ROLLBACK<\/em>;<\/pre>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Now we&#8217;re checking to see if it&#8217;s taken back :<\/span> <\/span><\/span><\/p>\n<pre><em>SELECT * FROM ADMIN.ISCI;<\/em><\/pre>\n<p align=\"left\"><span style=\"color: #8f187c\"><span style=\"font-size: large\">FOR UPDATE<\/span><\/span><\/p>\n<ul>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Locks selected records to prevent other users from changing them .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">Records are released when Rollback or Commit is performed .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">If more than one table is included in the join , all the selected records are locked in both tables .<\/span> <\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><span lang=\"en-US\">A user pulls the table with the for update option , and when a different user tries to delete the table , this operation is not allowed , it falls into the corresponding session lock .<\/span> <\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p align=\"left\"><span style=\"color: #000000\"><span style=\"font-size: large\"><b>See you in my next post.<\/b><\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi , In this article , I will explain topics such as updating data , deleting data from table and adding records to table . ADDING RECORD TO TABLE The INSERT command is used when adding a new record to the table . To add a single record : INSERT INTO table [(column [ ,column &hellip;<\/p>\n","protected":false},"author":10447,"featured_media":12287,"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,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3019],"tags":[3011,1340,6841,1572,6811,6836,3000,3002],"class_list":["post-11873","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-oracle-sql","tag-learn-oracle-sql","tag-oracle-sql","tag-oracle-sql-information","tag-sql","tag-sql-information","tag-sql-queries","tag-sql-tutorial","tag-what-is-sql"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/11\/dbms-sql-command.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/11873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/10447"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=11873"}],"version-history":[{"count":6,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/11873\/revisions"}],"predecessor-version":[{"id":12271,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/11873\/revisions\/12271"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/12287"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=11873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=11873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=11873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}