List:General Discussion« Previous MessageNext Message »
From:Moon's Father Date:June 26 2009 8:13am
Subject:Re: How can we stock the query result into a text file
View as plain text  
Login mysql client. Do the following commands.
tee ie.txt;
...
notee;

On Thu, Jun 25, 2009 at 10:29 PM, John Daisley <
john.daisley@stripped> wrote:

> SELECT INTO OUTFILE does almost the same thing as spool in SQL*Plus
>
> SELECT columnname from tablename into outfile '/path/and/filename.txt'
>
> Regards
>
> John
>
>
> > Hi
> >
> > In mysql , how can we stock the query result into a text file
> >
> > the table is too large , i don't want to dump it , but select a part of
> > it,
> > i wrote a script perl to do this, but each time i have to change the
> > parameters in the script to get another table, when i google it, i find
> > the
> > function in Oracle
> >
> > "
> > spool 'filenameandpath.txt'
> >
> > select ...
> > from ..
> > /
> >
> > spool off
> > "
> > does Mysql has such function?
> >
> >
> >
> >
> > --
> > -------------------------
> > Lin Chun
> >
> >
> > ______________________________________________
> > This email has been scanned by Netintelligence
> > http://www.netintelligence.com/email
> >
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
>
>


-- 
David Yeung,
MySQL Senior Support Engineer,
Sun Gold Partner.
My Blog:http://yueliangdao0608.cublog.cn

Thread
How can we stock the query result into a text fileLin Chun25 Jun
  • Re: How can we stock the query result into a text fileJohn Daisley25 Jun
    • Re: How can we stock the query result into a text fileMoon's Father26 Jun
      • RE: How can we stock the query result into a text fileJerry Schwartz26 Jun
  • Re: How can we stock the query result into a text fileJohan De Meersman26 Jun