MySQL导出数据到txt

来源:互联网 发布:什么是贵族气质知乎 编辑:程序博客网 时间:2024/05/21 19:05

MySQL导出数据到txt

SELECT email FROM xxxxxx where email is not null and email <> ''  into  outfile '/mail.txt' lines terminated by '\r\n' ;

其中lines terminated by “\r\n”表示每一行(即每一条记录)用\r\n分隔,\r\n是window系
统的换行符;

FIELDS TERMINATED BY ',' --字段用,进行分隔

A表中的内容不在表中

select name from where name not in (select name from B)

Mysql数据库选出在字段A中出现却不在字段B中出现的记录

select count(*) from tb where A not in (select B from tb)


0 0
原创粉丝点击