Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/myuser", "root", "root"); // please replace localhost and 3306 with IP and port of your database
- String sql = "select * from yourtable"; // your query
- Statement st = (Statement)conn.createStatement();
- st.executeQuery(sql);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement