jspファイルで データベースの中のテーブルの中身をCSVファイルに出力するプログラムを教えてください。 delete文で中身を消すプログラムは書けたのですが、これはできません。 conn = null; st=null; conn=DriverManager.getConnection("jdbc:mysql://localhost/データベース名?" + "user=ユーザー名&password=パスワード&useUnicode=true&characterEncoding=utf8"); st=conn.createStatement(); StringBuffer buf = new StringBuffer(); buf.append("delete from where id="+id); st.executeUpdate(buf.toString()); これで削除はできました。 なのでbuf.appendの中身を buf.append("SELECT from テーブル名 INTO OUTFILE "c:/data" "); これに書き換えればできると思ったのですができません。 よろしくお願いします。
↧