柏油路留不下脚印 2016-10-04 04:12 采纳率: 0%
浏览 750

the sort result is affected

I encontered a strange issue which the length of varchar affects the result in the mysql db.

The sql:

 SELECT oid, 
CODE, 
VALUE,
COMMENT,
obser_date, 
condition_code, 
date_asserted, 
location_code, 
patient_oid, 
performer
FROM t_clinical_observation
WHERE patient_oid= 1 AND CODE='1101' ORDER BY obser_date DESC

The oid is auto increase and comment is varchar.

If the lengh of comment is 512, the result is:
图片说明

If the lengh of comment is 128, the result is:
图片说明

  • 写回答

1条回答 默认 最新

  • dabocaiqq 2016-10-04 05:00
    关注
    评论

报告相同问题?