Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- class Insert{
- public static void main(String args[]){ try{
- Class.forName("oracle.jdbc.driver.OracleDriver");
- Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","system");
- Statement stmt=con.createStatement();
- int rowcount=stmt.executeUpdate("insert into emp12 values(33,'Irfan')");
- System.out.println(rowcount);
- stmt.close();
- con.close();
- } catch(Exception e){ System.out.println(e);}
- } }
Add Comment
Please, Sign In to add comment