Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/purvgwtw/public_html/tutorials/common.php on line 7
Update database values using JSP
Sponsered Links
Sponsered Links

Update database values using JSP

This section demonstrates you how to edit the existing database values.

<%@page import="java.sql.*"%>
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
      Statement st = con.createStatement();
      int c = st.executeUpdate("update data set name='John',address='Delhi' where id=1");
      out.println("Data is updated successfully");
    catch(Exception e){

Sponsered Links
Latest Updates
All Content of this site is for learning only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright © 2014 PURVACOMPUTERS.COM All Right Reserved