Guest User

Untitled

a guest
Sep 3rd, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Update query does not work
  2. Class.forName("oracle.jdbc.driver.OracleDriver");
  3. Connection connect =DriverManager.getConnection("jdbc:oracle:thin:@172.17.0.14:1521:develop","sis","psgh");
  4.  
  5. String qry=("update sample set one=2 where two=3");
  6. PreparedStatement ps = null;
  7. ps=connect.prepareStatement(qry);
  8.  
  9. int i=ps.executeUpdate();
  10. if(i==1)
  11. out.println("success");
  12. else
  13. out.println("failed");
  14.  
  15. create table (one number,two number);
Add Comment
Please, Sign In to add comment