JDBC and outfile/infile
- From: mike@xxxxxxxxxx (Mike)
- Date: Tue, 29 Nov 2005 21:53:22 GMT
I have MySQL and want to dump the contents of a table into a text file
then read it back in. Can that be done with JDBC? is each a Query or
Update?
--------------------- tried ----------------------------
sql="select * into outfile '/tmp/foo.txt' from foo";
rset = stmt.executeQuery(sql);
--------------------- also ---------------------------
sql="load data infile '/tmp/foo.txt' into table foo";
int rows = stmt.executeUpdate(sql);
-----------------------------------------------------
where foo is the table.
Thanks
.
- Follow-Ups:
- Re: JDBC and outfile/infile
- From: IchBin
- Re: JDBC and outfile/infile
- Prev by Date: Re: query list of connected users to MySQL DB?
- Next by Date: Re: JDBC and outfile/infile
- Previous by thread: JDBC-ODBC-Bridge
- Next by thread: Re: JDBC and outfile/infile
- Index(es):
Relevant Pages
|