{"id":118,"date":"2021-03-22T11:54:24","date_gmt":"2021-03-22T11:54:24","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/?page_id=118"},"modified":"2021-03-22T12:04:55","modified_gmt":"2021-03-22T12:04:55","slug":"sql-update","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/national-5\/sql-update\/","title":{"rendered":"SQL UPDATE"},"content":{"rendered":"<p>The UPDATE command is used to change data that is stored in one or more records.<\/p>\n<h2>\u00a0Single Column Update<\/h2>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE customers\r\nSET email='gandalf45@yahoomail.co.uk'\r\nWHERE customerID = 1\r\n<\/pre>\n<h2>Multiple Column Update<\/h2>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE customers\r\nSET emai ='gandalf45@yahoomail.co.uk', location='The West'\r\nWHERE customerID = 1\r\n<\/pre>\n<h1>DANGER!<\/h1>\n<p>Using an UPDATE command without a WHERE will update\u00a0<strong>all<\/strong> records<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE customers\r\nSET email = 'gandalf45@yahoomail.co.uk'\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The UPDATE command is used to change data that is stored in one or more records. \u00a0Single Column Update UPDATE customers SET email=&#8217;gandalf45@yahoomail.co.uk&#8217; WHERE customerID = 1 Multiple Column Update UPDATE customers SET emai =&#8217;gandalf45@yahoomail.co.uk&#8217;, location=&#8217;The West&#8217; WHERE customerID = 1 DANGER! Using an UPDATE command without a WHERE will update\u00a0all records UPDATE customers SET email = &#8216;gandalf45@yahoomail.co.uk&#8217; &nbsp;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":66,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-118","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/pages\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":9,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/pages\/118\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/pages\/118\/revisions\/129"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/pages\/66"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputingsql\/wp-json\/wp\/v2\/media?parent=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}