Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- public class populate {
- public static void main(String[] args) throws SQLException {
- Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/IMDB","root","user");
- Statement stmt = con.createStatement();
- String sql =
- "load data local infile 'titles.csv' n" +
- " replace n" +
- " into table Titles n" +
- " columns terminated by '\t' n" +
- " ignore 1 lines";
- stmt.execute(sql);
- }
- }
Add Comment
Please, Sign In to add comment