Guest User

Untitled

a guest
Apr 29th, 2019
33
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 InsertTable
  3. {
  4. public static void main(String args[])throws Exception
  5. {
  6. class.forName("com.mysql.jdbc.Driver");
  7. Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/VCE","root","eswecha");
  8. Statement st=con.create Statement();
  9. int Result=st.execute Update("insert into student("vaagdevi,101"));
  10. if(result>0)
  11. System.out.println("values are inserted");
  12. else
  13. System.out.println("values are not inserted");
  14. con.close();
  15. st.close();
  16. }
  17. }
Add Comment
Please, Sign In to add comment