{"id":508,"date":"2012-11-11T19:33:49","date_gmt":"2012-11-11T19:33:49","guid":{"rendered":"http:\/\/ilias-laptop\/examples\/core-java\/sql\/updatable-resultset-example\/"},"modified":"2018-11-05T16:04:51","modified_gmt":"2018-11-05T14:04:51","slug":"updatable-resultset-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/","title":{"rendered":"Updatable ResultSet Example"},"content":{"rendered":"<p>In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result set. To create an Updatable ResultSet and use its capabilites for data updates in a database one should perform the following steps: <\/p>\n<ul>\n<li>Load the JDBC driver, using the <code>forName(String className)<\/code> API method of the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Class.html\" target=\"_blank\">Class<\/a>. In this example we use the MySQL JDBC driver.<\/li>\n<li>Create a <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/Connection.html\" target=\"_blank\">Connection<\/a> to the database. Invoke the <code>getConnection(String url, String user, String password)<\/code> API method of the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/DriverManager.html\" target=\"_blank\">DriverManager<\/a> to create the connection.<\/li>\n<li>Create a <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/Statement.html\" target=\"_blank\">Statement<\/a>, using the <code>createStatement()<\/code> API method of the Connection. The Statement must have the concurrency type ResultSet.CONCUR_UPDATABLE, in order to return updatable result sets.<\/li>\n<li>Execute the query to the database, using the <code>executeQuery(String sql)<\/code> API method of the Statement over a specified column. The data produced by the given query is a <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/ResultSet.html\" target=\"_blank\">ResultSet<\/a>.<\/li>\n<li>Get the data from the current row. Use<code> the next()<\/code> API method and the <code>getString(String columnLabel)<\/code> API method of the ResultSet, to get the value of the designated column in the current row of this ResultSet object. <\/li>\n<li>Invoke the <code>moveToInsertRow()<\/code> API method to use the insert row. It is a buffer where a new row may be constructed, by calling the updater methods prior to inserting the row into the result set.<\/li>\n<li>Set values for the new row, using the <code>updateString(String columnLabel, String x)<\/code> API method.<\/li>\n<li>Insert the new row, using the <code>insertRow()<\/code> API method.<\/li>\n<li>Move the cursor to another row, with the <code>absolute(int row)<\/code> API method.<\/li>\n<li>Update the value of a specific column on that row, with the <code>updateString(String columnLabel, String x)<\/code> API method.<\/li>\n<li>Update the row, with the <code>updateRow()<\/code> API method.<\/li>\n<li>If we want to discard the update to the row we could use <code>cancelRowUpdates()<\/code> API method.<\/li>\n<li>Move the cursor to another row in order to delete it, with the <code>deleteRow()<\/code> API method. <\/li>\n<li>Retrieve the current values of the row from the database, with the refreshRow() API method.<\/li>\n<li>Move the cursor to the front of this ResultSet object, using the <code>beforeFirst()<\/code> API method, and then display table data again to check the updates, with <code>next()<\/code> and <code>getString(String columnLabel)<\/code> API methods,<\/li>\n<\/ul>\n<p> as described in the code snippet below.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush: java\">package com.javacodegeeks.snippets.core;\r\n\r\nimport java.sql.Connection;\r\nimport java.sql.DriverManager;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\nimport java.sql.Statement;\r\n\r\npublic class UpdatableResultSetExample {\r\n \r\n  public static void main(String[] args) {\r\n\r\n    Connection connection = null;\r\n    try {\r\n\r\n  \/\/ Load the MySQL JDBC driver\r\n\r\n  String driverName = \"com.mysql.jdbc.Driver\";\r\n\r\n  Class.forName(driverName);\r\n\r\n\r\n  \/\/ Create a connection to the database\r\n\r\n  String serverName = \"localhost\";\r\n\r\n  String schema = \"test\";\r\n\r\n  String url = \"jdbc:mysql:\/\/\" + serverName +  \"\/\" + schema;\r\n\r\n  String username = \"username\";\r\n\r\n  String password = \"password\";\r\n\r\n  connection = DriverManager.getConnection(url, username, password);\r\n\r\n  \r\n\r\n  System.out.println(\"Successfully Connected to the database!\");\r\n\r\n  \r\n    } catch (ClassNotFoundException e) {\r\n\r\n  System.out.println(\"Could not find the database driver \" + e.getMessage());\r\n    } catch (SQLException e) {\r\n\r\n  System.out.println(\"Could not connect to the database \" + e.getMessage());\r\n    }\r\n\r\n    try {\r\n\r\n\r\n  \/*\r\n\r\n    * An updatable result set allows modification to data in a table through the result set. \r\n\r\n    * If the database does not support updatable result sets, the result sets returned from \r\n\r\n    * executeQuery() will be read-only. To get updatable results, the Statement object used \r\n\r\n    * to create the result sets must have the concurrency type ResultSet.CONCUR_UPDATABLE. \r\n\r\n    * The query of an updatable result set must specify the primary key as one of the selected \r\n\r\n    * columns and select from only one table.\r\n\r\n    *\/\r\n\r\n\r\n  \/\/ Create a statement that will return updatable result sets\r\n\r\n  Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\r\n\r\n\r\n  \/\/ Primary key test_col must be specified so that the result set is updatable\r\n\r\n  ResultSet results = statement.executeQuery(\"SELECT test_col FROM test_table\");\r\n\r\n\r\n  System.out.println(\"Table data prior results handling... \");\r\n\r\n\r\n  \/\/ Display table data\r\n\r\n  while (results.next()) {\r\n\r\n\r\n    \/\/ Get the data from the current row using the column name - column data are in the VARCHAR format\r\n\r\n    String data = results.getString(\"test_col\");\r\n\r\n    System.out.println(\"Fetching data by column name for row \" + results.getRow() + \" : \" + data);\r\n\r\n\r\n  }\r\n\r\n  \r\n\r\n  \/\/ An updatable result supports a row called the \"insert row\". It is a buffer for holding the values of a new row\r\n\r\n  results.moveToInsertRow();\r\n\r\n\r\n  \/\/ Set values for the new row.\r\n\r\n  results.updateString(\"test_col\", \"inserted_test_value\");\r\n\r\n\r\n  \/\/ Insert the new row\r\n\r\n  results.insertRow();\r\n\r\n\r\n  \/\/ Move cursor to the third row\r\n\r\n  results.absolute(3);\r\n\r\n\r\n  \/\/ Update the value of column test_col on that row\r\n\r\n  results.updateString(\"test_col\", \"updated_test_value\");\r\n\r\n\r\n  \/\/ Update the row; if auto-commit is enabled, update is committed\r\n\r\n  results.updateRow();\r\n\r\n\r\n  \/\/ Discard the update to the row we could use \r\n\r\n  \/\/ results.cancelRowUpdates();\r\n\r\n\r\n  \/\/ Delete the fifth row\r\n\r\n  results.absolute(5);\r\n\r\n  results.deleteRow();\r\n\r\n\r\n  \/\/ Retrieve the current values of the row from the database\r\n\r\n  results.refreshRow();\r\n\r\n\r\n  System.out.println(\"Table data after results handling... \");\r\n\r\n\r\n  results.beforeFirst();\r\n\r\n\r\n  \/\/ Display table data\r\n\r\n  while (results.next()) {\r\n\r\n\r\n    \/\/ Get the data from the current row using the column name - column data are in the VARCHAR format\r\n\r\n    String data = results.getString(\"test_col\");\r\n\r\n    System.out.println(\"Fetching data by column name for row \" + results.getRow() + \" : \" + data);\r\n\r\n\r\n  }\r\n\r\n\r\n} catch (SQLException e) {\r\n\r\n    System.out.println(\"Error while operating on updatable ResultSet \" + e.getMessage());\r\n\r\n}\r\n\r\n  }\r\n}\r\n<\/pre>\n<p>\n<b>Example Output:<\/b><\/p>\n<pre style=\"background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;\">\r\n<code style=\"color: black; word-wrap: normal;\">Successfully Connected to the database!\r\nTable data prior results handling... \r\nFetching data by column name for row 1 : test_value_0\r\nFetching data by column name for row 2 : test_value_1\r\nFetching data by column name for row 3 : test_value_2\r\nFetching data by column name for row 4 : test_value_3\r\nFetching data by column name for row 5 : test_value_4\r\nFetching data by column name for row 6 : test_value_5\r\nFetching data by column name for row 7 : test_value_6\r\nFetching data by column name for row 8 : test_value_7\r\nFetching data by column name for row 9 : test_value_8\r\nFetching data by column name for row 10 : test_value_9\r\nTable data after results handling... \r\nFetching data by column name for row 1 : test_value_0\r\nFetching data by column name for row 2 : test_value_1\r\nFetching data by column name for row 3 : updated_test_value\r\nFetching data by column name for row 4 : test_value_3\r\nFetching data by column name for row 5 : test_value_5\r\nFetching data by column name for row 6 : test_value_6\r\nFetching data by column name for row 7 : test_value_7\r\nFetching data by column name for row 8 : test_value_8\r\nFetching data by column name for row 9 : test_value_9\r\nFetching data by column name for row 10 : inserted_test_value<\/code>\r\n<\/pre>\n<p>&nbsp;<br \/>\nThis was an example of how to use an updatable ResultSet in Java.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result set. To create an Updatable ResultSet and use its capabilites for data updates in a database one should perform the following steps: Load the JDBC driver, using the &hellip;<\/p>\n","protected":false},"author":7,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[189,1055],"class_list":["post-508","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql","tag-core-java-2","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Updatable ResultSet Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Updatable ResultSet Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-11T19:33:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-05T14:04:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ilias Tsagklis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ilias Tsagklis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\"},\"author\":{\"name\":\"Ilias Tsagklis\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/ca18b1aa108e3bfadf717e563e0a7a6e\"},\"headline\":\"Updatable ResultSet Example\",\"datePublished\":\"2012-11-11T19:33:49+00:00\",\"dateModified\":\"2018-11-05T14:04:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\"},\"wordCount\":355,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"keywords\":[\"core java\",\"sql\"],\"articleSection\":[\"sql\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\",\"name\":\"Updatable ResultSet Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2012-11-11T19:33:49+00:00\",\"dateModified\":\"2018-11-05T14:04:51+00:00\",\"description\":\"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"sql\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Updatable ResultSet Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/ca18b1aa108e3bfadf717e563e0a7a6e\",\"name\":\"Ilias Tsagklis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/Ilias-Tsagklis_avatar_1454249217-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/Ilias-Tsagklis_avatar_1454249217-96x96.jpg\",\"caption\":\"Ilias Tsagklis\"},\"description\":\"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"http:\/\/www.iliastsagklis.com\/\",\"https:\/\/www.linkedin.com\/in\/iliastsagklis\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/ilias-tsagklis\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Updatable ResultSet Example - Java Code Geeks","description":"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/","og_locale":"en_US","og_type":"article","og_title":"Updatable ResultSet Example - Java Code Geeks","og_description":"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-11-11T19:33:49+00:00","article_modified_time":"2018-11-05T14:04:51+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Ilias Tsagklis","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ilias Tsagklis","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/"},"author":{"name":"Ilias Tsagklis","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/ca18b1aa108e3bfadf717e563e0a7a6e"},"headline":"Updatable ResultSet Example","datePublished":"2012-11-11T19:33:49+00:00","dateModified":"2018-11-05T14:04:51+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/"},"wordCount":355,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","keywords":["core java","sql"],"articleSection":["sql"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/","name":"Updatable ResultSet Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2012-11-11T19:33:49+00:00","dateModified":"2018-11-05T14:04:51+00:00","description":"In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/updatable-resultset-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"sql","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/"},{"@type":"ListItem","position":5,"name":"Updatable ResultSet Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/ca18b1aa108e3bfadf717e563e0a7a6e","name":"Ilias Tsagklis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/Ilias-Tsagklis_avatar_1454249217-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/Ilias-Tsagklis_avatar_1454249217-96x96.jpg","caption":"Ilias Tsagklis"},"description":"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.","sameAs":["http:\/\/www.iliastsagklis.com\/","https:\/\/www.linkedin.com\/in\/iliastsagklis"],"url":"https:\/\/examples.javacodegeeks.com\/author\/ilias-tsagklis\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}