问题:查询数据时给字段起别名,运行MR程序后出现中文乱码
//查询"01"课程比"02"课程成绩低的学生的信息及课程分数: select a1.*,s.c_id `01课程`,s.s_score `01课程成绩`,s2.c_id `02课程`,s2.s_score `02课程成绩` from student a1 join score s on a1.s_id = s.s_id and s.c_id='01' join score s2 on a1.s_id = s2.s_id and s2.c_id='02' where s.s_score < s2.s_score;
解决:
第一步:修改idea编码为UTF-8,找到 settings 选项
第二步:将font修改为Monospaced或者NSimSun或者SimHei或者SimSun