On Thu, 29 Apr 2004 16:05:56 -0400 (EDT)
[EMAIL PROTECTED] wrote:

> hi,
>       i have a huge database and i want to transfer the data to a
>       file. can i 
> tranfer the result of a query to a file???? for eg.
> 
> if i say select * from tablename;
> 
> it selects all the tables.  but the mysql window is small to see all
> the records when the database has many records.can i send these
> records and save it in a file?????

http://dev.mysql.com/doc/mysql/en/SELECT.html

Search for "INTO OUTFILE"

SELECT * INTO OUTFILE '/home/me/data.txt' FROM mytable;

(Note, you may have to deal with OS permission issues and you need the FILE MySQL 
privilege)

Josh

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to