Guest User

Untitled

a guest
Sep 21st, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.sql.*;
  2. class Insert{
  3.  
  4. public static void main(String args[]){ try{
  5. Class.forName("oracle.jdbc.driver.OracleDriver");
  6. Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","system");
  7. Statement stmt=con.createStatement();
  8.  
  9. int rowcount=stmt.executeUpdate("insert into emp12 values(33,'Irfan')");
  10.  
  11. System.out.println(rowcount);
  12. stmt.close();
  13. con.close();
  14. } catch(Exception e){ System.out.println(e);}
  15.  
  16. } }
Add Comment
Please, Sign In to add comment