{"id":141,"date":"2024-08-28T13:29:10","date_gmt":"2024-08-28T13:29:10","guid":{"rendered":"https:\/\/www.yehger.com\/?p=141"},"modified":"2024-09-25T06:28:22","modified_gmt":"2024-09-25T06:28:22","slug":"6-dml-data-manipulation-language","status":"publish","type":"post","link":"https:\/\/www.yehger.com\/index.php\/2024\/08\/28\/6-dml-data-manipulation-language\/","title":{"rendered":"6. DML &#8211; Data Manipulation Language"},"content":{"rendered":"<h2>Add Data<\/h2>\n<pre><code class=\"language-sql\">-- Add data for fixed columns.\nINSERT INTO tableName (column1,column1,...) VALUES(value1,value2,...);\n\n-- Add data for whole columns\nINSERT INTO tableName VALUES(value1,value2,...);\n\n-- Add multiple data\nINSERT INTO tableName (column1,column2,...) VALUES(value1,value2,...),(value1,value2,...);\n\nINSERT INTO VALUES(value1,value2,...),(value1,value2,...);<\/code><\/pre>\n<h2>Update Data<\/h2>\n<pre><code class=\"language-sql\">UPDATE tableName SET column1 = value1,column2 = value2,... [WHERE condition];\n\n-- Example\nUPDATE users SET name = &#039;Mr.li&#039; WHERE id = 2;<\/code><\/pre>\n<h2>Delete Data<\/h2>\n<pre><code class=\"language-sql\">DELETE FROM tableName [WHERE condition];\n\n-- Example\nDELETE FROM users where id = 1;<\/code><\/pre>\n<h2>Check Data<\/h2>\n<pre><code class=\"language-sql\">SELECT * FROM tableName;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add Data &#8212; Add data for fixed columns. INSERT INTO tableName (column1,column1,&#8230;) VALUES(value1,value2,&#8230;); &#8212; Add data for whole columns INSERT&#8230; <a class=\"read-more\" href=\"https:\/\/www.yehger.com\/index.php\/2024\/08\/28\/6-dml-data-manipulation-language\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/comments?post=141"}],"version-history":[{"count":2,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/posts\/141\/revisions\/146"}],"wp:attachment":[{"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/media?parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/categories?post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yehger.com\/index.php\/wp-json\/wp\/v2\/tags?post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}