时间:2021-07-01 10:21:17 帮助过:18人阅读
column 代表数据库字段,property代表对象中的属性,两者之间为映射关系.collection中的result为查询出的关联部分的属性,一对多,多合并为集合,一还是一,结果中一不会应为一对多而出现重复.
select mmc.id ,mmc...,mtt.name from mml_card mmc left join mt_treatment mtt on mmc.id = mtt.medical_card_id
2. 按类型分组查询某个条件的数量
select tumour_kind_name tumourKindName,COUNT(DISTINCT patient_id) shouldFollow from mss_medical_card mmc WHERE YEAR(DATE_ADD(mmc.confirmed_date,INTERVAL mmc.cycle day)) = YEAR(‘2017-06-01 20:14:12‘) and is_death = 0 group by tumourKindName;
mysql function
标签:distinct lis span varchar mysql logs bsp ati car