当我在 mysql 中运行联合查询时,一些值返回为 BLOB,有没有办法解决这个问题?我合并查询,因为我希望特定列的总和位于底部
select a.app_file_id,a.app_trn,a.app_fname,a.app_lname,l.computer_interest,l.loan_life,l.app_ln_amnt, l.commit_date,l.app_amnt_owed,r.amount_paid
from applicant a
left join loan l on l.l_app_file_id=a.app_file_id
left join receipt r on r.r_app_file_id=l.l_app_file_id
WHERE l.app_loan_type=r.receipt_loan_type
AND l.app_loan_type='Computer Loan'
AND MONTHNAME(commit_date) = 'April'
and YEAR(commit_date)=2012
Union
Select '', '','','','','',SUM(l.app_ln_amnt),'',SUM(l.app_amnt_owed),SUM(r.amount_paid)
from applicant a
left join loan l on l.l_app_file_id=a.app_file_id
left join receipt r on r.r_app_file_id=l.l_app_file_id
WHERE l.app_loan_type=r.receipt_loan_type
AND l.app_loan_type='Computer Loan'
AND MONTHNAME(commit_date) = 'April'
and YEAR(commit_date)=2012