这样行不行? select PROD_CD, PROD_NM, LOT_NO, QTY from TB_FDB302 union all select '合计', ' ', ' ', sum(QTY) from TB_FDB302
你这个是说的所有字段字符长度?