用trim 如:select * from mobilecustomers where papertypeid = '身份证' and length(trim(papernumber))<15 and companyid='0001';