import java.sql.*;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class loadREHBER{
public static void main(String args[]) throws IOException
{
try {
String url="jdbc:mysql://localhost/yto?user=root";	 
Connection conn =DriverManager.getConnection(url);
Statement stmt = null;
ResultSet rs1 = null;
stmt = conn.createStatement();
String s1= "load data local infile 'YTO.txt' into table REHBER LINES TERMINATED BY '\r\n'";
if (stmt.execute(s1)) {rs1 = stmt.getResultSet();}
//System.out.println(rs1.getString(s1));
} catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
 } 
}
}
