点滴记忆

笔记

常用MYSQL语句随记

2013-1-31 一抹阳光 数据库

1、多表查询结果导出到本地文本文件。

SELECT ad.aid,arc.title,ad.company  INTO OUTFILE 'd:/company.txt' LINES TERMINATED BY '\r\n' FROM dede_addon17 AS ad LEFT JOIN dede_archives AS arc ON ad.aid=arc.id WHERE ad.cname='';