{"id":392,"date":"2013-12-02T09:39:34","date_gmt":"2013-12-02T09:39:34","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=392"},"modified":"2013-12-02T09:39:34","modified_gmt":"2013-12-02T09:39:34","slug":"executeupdate-vs-executequery-vs-execute","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/executeupdate-vs-executequery-vs-execute\/","title":{"rendered":"executeupdate vs executequery vs execute"},"content":{"rendered":"<p><strong>executeupdate vs executequery vs execute<\/strong><\/p>\n<p><em>ResultSet executeQuery()<\/em> &#8211; Used for reading the content of the database.<br \/>\noutput will be in form of ResultSet.<br \/>\neg &#8211; SELECT statement. <\/p>\n<p><em>int executeUpdate()<\/em> &#8211; Used for DML(altering the database).<br \/>\noutput will be in int.<br \/>\neg &#8211; DROP TABLE or DATABASE, INSERT into TABLE, UPDATE TABLE, DELETE from TABLE statements. <\/p>\n<p><em>boolean execute()<\/em> &#8211; Executing SQL statements.<br \/>\noutput will be in  boolean. TRUE indicates the result is a ResultSet and FALSE indicates it has the int value which denotes number of rows affected by the query.<br \/>\neg &#8211; DROP TABLE or DATABASE, INSERT into TABLE, UPDATE TABLE, DELETE from TABLE statements. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>executeupdate vs executequery vs execute ResultSet executeQuery() &#8211; Used for reading the content of the database. output will be in form of ResultSet. eg &#8211; SELECT statement. int executeUpdate() &#8211; Used for DML(altering the database). output will be in int. eg &#8211; DROP TABLE or DATABASE, INSERT into TABLE, UPDATE TABLE, DELETE from TABLE statements.&hellip; <a href=\"https:\/\/codethataint.com\/blog\/executeupdate-vs-executequery-vs-execute\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-392","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":1,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":393,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/392\/revisions\/393"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}