SELECT g.goods_id, g.bn,g.name,b.brand_name,g.price,g.mktprice,c.cat_name into outfile '/tmp/xxx.xls' from sdb_b2c_goods as g LEFT JOIN sdb_b2c_goods_cat as c ON g.cat_id=c.cat_id LEFT JOIN sdb_b2c_brand as b ON g.brand_id = b.brand_id where length(g.intro)>99999;