I'm having a problem of displaying all the data of a column in a text file I can display only the first data, so please someone tell me what can I make to display them together in a text file.
Connection con = DriverManager.getConnection(host, uname,password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(SQL);
while(rs.next())
{
String teller =rs.getString("name");
File file = new File("C:/Users/MY TOSHIBA/Desktop/04082012.txt");
Writer output =null;
output = new BufferedWriter(new FileWriter(file));
output.write(teller);
output.close();
}