Chinaunix首页 | 论坛 | 博客
  • 博客访问: 549820
  • 博文数量: 76
  • 博客积分: 2990
  • 博客等级: 少校
  • 技术积分: 827
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-26 10:53
文章分类

全部博文(76)

文章存档

2011年(47)

2010年(13)

2009年(5)

2008年(11)

分类: Mysql/postgreSQL

2011-06-08 17:30:13

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

最尾三行是定义输出格式


SELECT a.email,b.server_id

FROM user a ,stastics.ldp_user b

WHERE a.uid=b.user_id and b.game_id=1 order by b.server_id desc

into outfile '/tmp/outfile.dat'

fields terminated by ','

enclosed by '"'

lines terminated by '\n';


最终以mysql daemon启动用户的身份写出文件到 /tmp/outfile.dat,

outfile.date的文件格式是普通的ANSCII文件。

文件内容看起来如下:

"121237","183.3.241.115","1292252222","LI","","","2011-02-15 22:59:45","0","0","0","0","0","0","0","0","0","0","0","0","0","0",\N,"China","0","","","","1","1"
"121542","116.22.51.212","1292271132","LI","","","2011-02-15 22:59:45","0","0","0","0","0","0","0","0","0","0","0","0","0","0",\N,"China","0","","","","1","1"


阅读(2081) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~